(LCOW) Linux-only containers docker-compose getting: 'cannot download image with operating system "linux" when requesting "windows"'
Expected behavior
Docker Edge running with 'Linux containers' feature enabled should pull all images from docker-compose yml as all images are Linux based.
Actual behavior
PS C:\DockerProjects\myproject> docker-compose up -d Pulling db (tutum/mysql:latest)... latest: Pulling from tutum/mysql ERROR: cannot download image with operating system "linux" when requesting "windows"
Information
Virtualisation: Proxmox 5 VM running qemu/KVM Operating System: Windows 10 Pro N (Version 1709; OS Build 16299.125)
Docker information: Version 17.12.0-ce-rc4-win44 (14896) Channel: edge f23de3e
Machine: 0.13.0 Compose: 1.18.0
Docker's Diagnostic ID: 8B85E64E-6E12-43FB-B240-432FFBB3F7EC/2017-12-31_03-46-42
Issue looks the same as; https://github.com/docker/for-win/issues/1464
Steps to reproduce the behavior
- docker-compose.yml with contents of:
version: '3.0'
services:
web:
build: .
links:
- db
volumes:
- ./public_html:/var/www/project
ports:
- "8080:80"
- "3001:3001"
- "3000:3000"
db:
image: tutum/mysql
environment:
MYSQL_USER: root
MYSQL_PASS: password
volumes:
- ./Mysql:/var/lib/mysql
- ./MysqlHome:/root
ports:
- "3306:3306"
phpmyadmin:
image: phpmyadmin/phpmyadmin
ports:
- 81:80
links:
- db
environment:
PMA_HOST: db
- Run 'docker-compose up -d' in the source directory.
needs $Env:DOCKER_DEFAULT_PLATFORM = 'linux'
I'm getting the same message even after setting DOCKER_DEFAULT_PLATFORM
Version 17.12.0-ce-win45 (15017)
Channel: edge
6bbf198
@zeecodes what happens if you pre-pull the images and specify the --platform flag?
docker pull --platform linux tutum/mysql
docker pull --platform linux phpmyadmin/phpmyadmin
Just missing a global environment:
Open PowerShell as Administrator
Run: [Environment]::SetEnvironmentVariable("LCOW_API_PLATFORM_IF_OMITTED", "linux", "Machine")
Now restart docker.
As next it will download the image and stop with the problem of #1486 ;)
>docker image pull hello-world
Using default tag: latest
latest: Pulling from library/hello-world
ca4f61b1923c: Extracting [==================================================>] 985B/985B
failed to register layer: failed to start service utility VM (applydiff 2ce369879a820bc01087b83ce7b664f3915527633fc119549c75a3d2b06a0977): container 2ce369879a820bc01087b83ce7b664f3915527633fc119549c75a3d2b06a0977_svm encountered an error during CreateContainer: failure in a Windows system
Thank you. @enbock solution worked for me.
Also now Linux containers are used in the stable release, and with stable I'm not having this issue.
Closed issues are locked after 30 days of inactivity. This helps our team focus on active issues.
If you have found a problem that seems similar to this, please open a new issue.
Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. /lifecycle locked