0

I am trying to pull an image from ECS. I do it from WSL2 ubuntu 20.04 command line and I have docker desktop installed with WSL2 based engine. Then I have this error: image operating system "windows" cannot be used on this platform. I did some research and the solution that I found is to "switch to windows container" but now I have a new problem where I cannot run docker in my distro: "The command 'docker' could not be found in this WSL 2 distro. We recommend to activate the WSL integration in Docker Desktop settings." I already have WSL integration in the setting. If I switch back to Linux container I don't have the issue.

I was wondering if there was a solution to be able to run that image inside that distro

Thank you

PS: sorry if i'm not clear English is not my first language

  • If you're on a Linux machine, it seems you can't run windows container on it, see here : https://stackoverflow.com/a/45777348/3608483 – XouDo May 10 '21 at 12:42

2 Answers2

0

so looks like your symlink between your windows and wsl2 which handle the communication is broken. Though its its hard to tell anything on the information you have given.

could you check these with help of $which docker and symlink and also share the docker version you are using currently.

Vinod
  • 515
  • 4
  • 11
  • Hi thank you for your answer I am using Docker Desktop version 3.3.3 (64133) For the symlink from the ubuntu i have: - ./.azure -> /mnt/c/Users/Admin/.azure - ./.aws -> /mnt/c/Users/Admin/.aws - ./.docker/contexts -> /mnt/c/Users/Admin/.docker/contexts I am not sure if it is what you are asking for, I'm new to docker and I am a beginner in Linux For now the solution that I found is running the command in the powershell instead of the ubuntu wsl when I switch to "windows container" – Ny Toby Finarimihamina May 11 '21 at 15:33
  • if its working from PowerShell then we can assume that some issue with the integration and links. its old issue with WSL. in WSL 2 windows shipped complete Linux Kernel which was not the case with WSL1. if still you want to fix this issue i think you can refer this issue which can give the idea. https://github.com/docker/for-win/issues/7311 – Vinod May 11 '21 at 17:12
  • Random Luck today: https://stackoverflow.com/questions/63497928/ubuntu-wsl-with-docker-could-not-be-found – Vinod May 11 '21 at 17:18
0

Hi thank you for your answer

I am using Docker Desktop version 3.3.3 (64133)

For the symlink from the ubuntu i have:

  • 40560 0 lrwxrwxrwx 1 tobyfintops tobyfintops 25 Apr 12 17:05 ./.azure -> /mnt/c/Users/Admin/.azure
  • 40558 0 lrwxrwxrwx 1 tobyfintops tobyfintops 23 Apr 12 17:05 ./.aws -> /mnt/c/Users/Admin/.aws
  • 40553 0 lrwxrwxrwx 1 tobyfintops tobyfintops 35 Apr 12 17:05 ./.docker/contexts -> /mnt/c/Users/Admin/.docker/contexts

I am not sure if it is what you are asking for, I'm new to docker and I am a beginner in Linux

For now the solution that I found is running the command in the powershell instead of the ubuntu wsl when I switch to "windows container"