-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot mix Windows and Linux containers in docker-compose.yml #5872
Comments
@KevM Is that possible? AFAIK you can't run windows & linux containers on the same machine at the same time... The closest use case to what you want to do is when deploying to a swarm having linux and windows nodes, using a compose file... But if by some case I'm not up to date about Docker 4 Windows capabilities... please correct me if I'm wrong! |
It is a great question. I don't see this limitation documented anywhere. The FAQ states:
Is the |
Based on what I'm seeing here: moby/moby#35303 You might want to try setting the |
@shin- Thanks for the assistance. Added the platform entry for the windows service: services:
mssql:
image: microsoft/windowsservercore
platform: windows
nginx:
image: nginx-alpine
platform: linux
version: '2.4' Still failing with a slightly different error message:
Note: I do have an environment variable set |
Good news! After updating to Windows 10 1803 17134.1 the following compose file is working: version: '2.4'
services:
mssql:
image: microsoft/windowsservercore
platform: windows
nginx:
image: nginx
platform: linux |
Thanks for the follow-up! I'll close this issue as a result. |
How can this work? "platform" is an unsupported option in docker-compose version 1.21.1, build 7641a56 |
@KevM does this really work? |
This should be re-opened, since 3.x does not yet implement it. |
Yep - I'm seeing this as not working on Docker Engine 19.03.1 with a 3.7 compose file Related: #5985 (comment) |
Confirming crossan007 comment, it's not working on Docker Engine 19.03.1 with 3.7 compose file. |
Confirming not working with:
|
My understanding is that the feature is deprecated since WSL2 ==>docker/for-win#9541 But... it seems to be on the roadmap ==> docker/roadmap#79 I am able to have 2 containers in my docker-compose.yaml
I have Docker Engine v19.03.13 with the experimental at true & Experimental Feature (Enable CLI + Cloud exp) |
Results...
Docker Desktop: 3.5.2 (66501), Linux containers ( |
Attempting to mix windows and linux containers in a single
docker-compose.yml
does not work.Description of the issue
With the release of compose 1.21.0 I was expecting to be able to mix windows and linux containers.
Context information (for bug reports)
Output of "docker-compose config"
Steps to reproduce the issue
docker-compose up
Observed result
Expected result
Containers to be started.
Additional information
OS version / distribution,
docker-compose
install method, etc.Using Edge install of Docker for Windows.
The text was updated successfully, but these errors were encountered: