How can I open/run a YML compose file on my computer? I've installed Docker for Windows and Docker tools but couldn't figure out how.
Asked
Active
Viewed 1.6e+01k times
2 Answers
64
If you are asking how to open YAML files, then you can use some common editors like NotePad++ in windows or vim in linux. If your question is about running the compose yaml file, then run this command from the directory where compose file is residing:
docker-compose -f {compose file name} up
You can avoid -f
if your filename is docker-compose.yml

Jingjie Yang
- 605
- 2
- 10
- 22

humblebee
- 1,044
- 11
- 25
-
Hum... it is "locked", need the "&" to only run-and-go? So `docker-compose up &` – Peter Krauss Jul 25 '18 at 11:00
-
How to KILL?? After `docker stop` the composed, they stay there! – Peter Krauss Jul 25 '18 at 11:03
-
2@PeterKrauss for a stack started with `docker-compose up`, use `docker-compose stop` to just stop the containers, or `docker-compose down` to stop and remove them. – Dario Seidl Nov 20 '18 at 11:24
38
To manage .yml
files you have to install and use Docker Compose.
Installation instructions can be found here: https://docs.docker.com/compose/install/
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.
If you need more information, take a look to Docker Compose docs: https://docs.docker.com/compose

kstromeiraos
- 4,659
- 21
- 26
-
Docker for windows includes compose, from docs: Docker for Mac, Docker for Windows, and Docker Toolbox include Docker Compose, so most Mac and Windows users do not need to install Docker Compose separately. – Peter Grainger Jun 05 '17 at 09:27