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 in Docker by anonymous
• 19,570 points
50 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 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
• 58,210 points
889 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
11,548 views
0 votes
1 answer
0 votes
2 answers

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

Instead of using docker run you could ...READ MORE

answered Aug 13, 2019 in Docker by Sirajul
• 58,210 points
21,462 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
• 57,700 points
909 views