I have installed docker toolbox on windows 10 (https://docs.docker.com/toolbox/toolbox_install_windows/)

Then I have created a directory for my project, with docker-compose.yml file (https://docs.docker.com/compose/)

I run MINGW64 then cd to the directory and hit docker-compose up to start the images for the project. Note: MINGW64 terminal is now showing the logs and I can't hit other commands.

Now, say I have to create another project: I will create another directory with another docker-compose.yml file.

How to run both the projects simultaneously? In this situation, I can't write on MINGW64 terminal to run the second project while the first project is running.

Hwo to run two projects (with two different docker-compose.yml files) simultaneously, with docker toolbox?

Thank you


If by simultaneously, you mean from a single command, you could go for something like that :

$ docker-compose -f path/to_your/first_compose.yml up -d && docker-compose up -d

Provided that you have your second compose file in current folder.

If you mean from a single docker-compose call, I don't think there's a way to do it.

The fact that you didn't get interaction on the CLI back is due to the way you launched the your compose. By providing the '-d' flag, you detach the containers' output from current shell. Example with a gitlab setup with 3 containers:

$ docker-compose -f dev/docker/docker-gitlab/docker-compose.yml up -d
Creating docker-gitlab_postgresql_1 ... done
Creating docker-gitlab_redis_1      ... done
Creating docker-gitlab_gitlab_1     ... done
$ do_something # you get back interactive shell

You can still access the output of the containers with docker-compose if required, the same as with docker, with the log command.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.