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,620 points

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,090 points
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
0 votes
1 answer
+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
+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,140 points