0

Learning docker following a course in udemy. i have all the prerequisites like docker desktop and switched to windows container. While trying to run a container using

docker container run docker4dotnet/nanoserver hostname

getting error like below

Unable to find image 'docker4dotnet/nanoserver:latest' locally latest: Pulling from docker4dotnet/nanoserver b5c97e1d373f: Extracting [==================================================>] 103MB/103MB docker: failed to register layer: re-exec error: exit status 1: output: hcsshim::ProcessBaseLayer \?\C:\ProgramData\Docker\windowsfilter\90f22cdfe817e491c24b8e26f35b4ec43c6477ce0c86cdbfb95a59e2606762a5: The semaphore timeout period has expired.

unable to figure it out. can some one help on this

NOTE : tried to switch the container to linux but it says

Unable to find image 'docker4dotnet/nanoserver:latest' locally latest: Pulling from docker4dotnet/nanoserver b5c97e1d373f: Downloading docker: image operating system "windows" cannot be used on this platform.

NOTE 2 : Even tried docker run -d -p 8090:80 docker/getting-started it says below even though windows container is selected

PS C:\WINDOWS\system32> docker run -d -p 8090:80 docker/getting-started docker: Error response from daemon: operating system on which parent image was created is not Windows.

venkatesh
  • 52
  • 4
  • You should check your OS and machine whether everything is fine. There are same issues on the internet that ended up finding problems on host machine. https://github.com/docker/compose/issues/4089 https://forums.docker.com/t/unable-to-pull-any-image-fails-with-message-the-semaphore-timeout-period-has-expired/48807 – Oguzhan Aygun Mar 09 '22 at 13:18

1 Answers1

0

use this lines in cmd:

docker pull mcr.microsoft.com/windows/nanoserver:20H2
docker container run mcr.microsoft.com/windows/nanoserver:20H2 hostname
NimaGhasri
  • 41
  • 5