How to run YML compose file

+3 votes

How can I open a YML compose file on my computer? I've installed Docker for Windows and Docker tools but couldn't figure out how to do it.

Sep 8, 2018 in DevOps & Agile by Sophie may
• 10,610 points
246,972 views

5 answers to this question.

+3 votes
Best answer

You can run the following command to run the docker-compose.yaml file:

docker-compose -f {compose file name} up

You can ignore the -f flag if your file name is docker-compose.yaml

answered May 7, 2019 by Mithin

selected Dec 10, 2020 by MD
+1 vote

To run and open .yml files you have to install Docker Compose.

After the installation, go to your docker-compose.yml directory and then execute docker-compose up to create and start services in your docker-compose.yml file.

answered Sep 8, 2018 by Tyrion anex
• 8,700 points
This only works if the file is named `docker-compose.yml`, which I think is the big gotcha that new users face because this isn't even mentioned by most tutorials. You have to use `docker-compose -f MyFile.yml up` if you want to name your file anything else.
0 votes
You can open the yaml file using any sort of editor like Notepad++.
answered May 7, 2019 by Yesha
+1 vote

To manage and run docker-compose files, you need to install docker compose. Have a look at the documentation to install Docker compose for windows.

Once the installation is done, go to your docker-compose.yml directory and then execute docker-compose to create and start services in your docker-compose.yml file.

answered May 7, 2019 by Yamini
0 votes

Hi,

Compose is a tool for defining and running multi-container Docker applications. With Compose, you use a YAML file to configure your application’s services. 

Compose is basically a three-step process.

  1. Define your app’s environment with a Dockerfile so it can be reproduced anywhere.

  2. Define the services that make up your app in docker-compose.yml so they can be run together in an isolated environment.

  3. Run docker-compose up and Compose starts and runs your entire app.

answered Dec 10, 2020 by MD
• 95,440 points

Related Questions In DevOps & Agile

+1 vote
2 answers

How do I run Apache server from Docker without mapping to a location?

If you're seeing a 500 error, that's ...READ MORE

answered Oct 18, 2018 in DevOps & Agile by lina
• 8,220 points
1,845 views
0 votes
1 answer

How to a run deployed app in Docker for Windows?

To deploy an ASP.NET web application to ...READ MORE

answered Aug 30, 2018 in DevOps & Agile by Tyrion anex
• 8,700 points
878 views
0 votes
1 answer

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

Since docker images are trimmed to bare minimum ...READ MORE

answered Sep 11, 2018 in DevOps & Agile by Damon Salvatore
• 5,980 points
3,514 views
0 votes
1 answer
+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,090 points
2,436 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