With docker compose which parameter should I use to run a yaml file

0 votes

Hi guys, a quick question!

With docker-compose, which parameter should I use to run a YAML file?

I’m using 

docker-compose -f service.yml —up

But if I use -d it won’t go on detached mode. Or am I using a wrong command??

Oct 27, 2020 in Docker by anonymous
• 19,610 points
779 views

1 answer to this question.

0 votes

Yep. Wrong command.

$ docker-compose build

And then run this command

$ docker-compose up

You don't need to use the YAML file name in the command. 

You just need to execute this command from the directory where the YAML file is present

answered Oct 27, 2020 by Justin

Related Questions In Docker

0 votes
1 answer

Is it possible to use JSON instead of YAML for docker-compose file?

You can use JSON instead of YAML ...READ MORE

answered Jul 2, 2019 in Docker by Sirajul
• 59,230 points
4,967 views
0 votes
2 answers

How to edit file after I shell to a docker container?

You can even install it using a ...READ MORE

answered Apr 23, 2019 in Docker by Ashish
17,868 views
0 votes
1 answer

Efficient way to run a Docker Compose stack in production?

Here is a concept which you can ...READ MORE

answered Aug 2, 2018 in Docker by Damon Salvatore
• 5,980 points
1,148 views
+1 vote
2 answers

How do I copy a file from docker container to host?

Here is a way which you can ...READ MORE

answered Aug 28, 2018 in Docker by Damon Salvatore
• 5,980 points
28,597 views
+2 votes
1 answer
+2 votes
1 answer

Deploy Docker Containers from Docker Cloud

To solve this problem, I followed advice ...READ MORE

answered Sep 3, 2018 in AWS by Priyaj
• 58,020 points
2,725 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP