StefanScherer / windows-docker-machine

Work with Windows containers and LCOW on Mac/Linux/Windows

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

building via docker-compose

bhazard opened this issue · comments

Hi Stefan - ty so much for your contributions -- brilliant!
From a mac ... I have built your packer vm and successfully can build and deploy docker containers to it ... but cannot figure out how to use docker-compose? I have 2 docker contexts, default (regular linux vm) and 2019-box (as created per directions here. If I create a new dockerfile and build, docker build . works fine when docker context is 2019-box. But a docker-compose build that refers to the child Dockerfile fails with the dasterdly "no matching manifest." Seems like an issue with docker-compose not supporting docker context?? I provided my details on https://stackoverflow.com/questions/59911481/docker-no-matching-manifest-for-docker-compose-build-but-docker-build-works-wh/59911623#59911623. Any thoughts on how to use docker-compose to target a windows context from a mac?

Hi Bill, thank you for your feedback!
Docker-compose does not support docker context yet.
In my table of commands https://github.com/StefanScherer/windows-docker-machine/blob/master/README.md#further-commands you find two ways, one is docker context, the other is

eval $(docker-machine env 2019-box)

This sets the DOCKER_HOST and other env variables. This works with docker-compose.

To switch back to the Linux engine, use

eval $(docker-machine env --unset)

Ah, awesome thanks! I will close this then. If I may suggest ... adding that note to the README would be helpful (I did not understand why you had included the alternative to docker context use ...)
Again, thank you for all of your hard work!