StefanScherer / dockerfiles-windows

Various Dockerfiles for Windows Containers
MIT License
1.1k stars 396 forks source link

Run docker-compose in docker #432

Closed StefanScherer closed 4 years ago

StefanScherer commented 4 years ago

Run docker-compose in a windows container.

This PR is to test https://github.com/docker/docker-py/pull/2421 It installs docker-compose with pip and replaces the npipesocket.py with the one from the pull request.

Without that change I get

$ docker run -v //./pipe/docker_engine://./pipe/docker_engine -it compose-in-docker docker-compose up

ERROR: Couldn't connect to Docker daemon. You might need to start Docker for Windows. 

With the change I get

$ docker run -v //./pipe/docker_engine://./pipe/docker_engine -it compose-in-docker docker-compose up

Creating test_whoami_1 ... done                                                                                
Attaching to test_whoami_1                                                                                     
whoami_1  | Listening on :8080                                                                                 
Gracefully stopping... (press Ctrl+C again to force) 
Stopping test_whoami_1 ... done