Docker Launching Microsoft nanoserver container on Windows - docker

I am starting with Docker and trying to launch a very simple command to pull the "nanoserver" container:
docker pull mcr.microsoft.com/windows/nanoserver:2004
The output of this command is
2004: Pulling from windows/nanoserver
no matching manifest for linux/amd64 in the manifest list entries
Why is Docker complaining about not finding "linux" in the manifest of the image if I am trying to execute in pure Windows?
Also, how can I see the contents of that "manifest" ?
Thank you!

Related

Get an images manifest file without using docker

I want to get the manifest file of a docker image but unfortunately I cannot use docker. Is it possible to download it using curl?
The equivalent command with docker would be:
docker manifest inspect <image_name>

What is default platform type in docker image?

When loading an image from a docker hub in dockerFile command FROM, if the platform is not specified, is it loaded based on the current server architecture?
I mean, when I build dockerfile on amazon linux 2 x86, is docker engine get docker image which can running on linux/x86-64?
Thank you!!
The docker build defaults to pulling base images with the platform of the target platform you are building. And that target platform defaults to the platform of your docker host. So if your docker engine is running on linux/amd64, and you do not pass --platform to either docker build or the FROM line, it will attempt to pull linux/amd64 images from a multi platform base image.
You can check your docker host by running:
docker system info --format '{{.OSType}}/{{.Architecture}}'

When user linux docker image no issues, but windows docker image fails

I get the following error when using windows docker golang image...
Job failed: Error response from daemon: manifest for
golang:latest-windowsservercore-1803 not found
line from .gitlab-ciyml file...
image: golang:latest-windowsservercore
However, when I use the default golang image which is based on linux i think, it works fine with no errors.
the below works...
image: golang:latest
I need the build phase to build windows executable;le hence the change. I have tried lots of different permutations take from...
https://hub.docker.com/_/golang
but nothing works is there something I am doing wrong?
This image is based on Windows Server Core
(microsoft/windowsservercore). As such, it only works in places which
that image does, such as Windows 10 Professional/Enterprise
(Anniversary Edition) or Windows Server 2016.
golang-dockerhub
So if you using gitlib then there is also some limitation and combination of the container.
The Docker executor
GitLab Runner can use Docker to run jobs on user provided images. This
is possible with the use of Docker executor.
The Docker executor when used with GitLab CI, connects to Docker
Engine and runs each build in a separate and isolated container using
the predefined image that is set up in .gitlab-ci.yml and in
accordance in config.toml.
The following table lists what combinations of containers, executors, and OS are supported.
docker executor
You can check also window container limitation here

No matching manifest for unknown when pulling microsoft/aspnet

I have a CentOS 7 with Docker installed on a VirtualBox. I am also new to Docker. When I run:
docker pull microsoft/aspnet
I get an error:
no matching manifest for unknown in the manifest list entries
I can see the image listed if I do:
docker search aspnet
Do I understand this correctly that this image is not suitable to run in Docker on Linux? Or is there an error getting the correct manifest - thus 'unknown' in the error message?
Running below command produces:
$ docker info -f '{{.OSType}}/{{.Architecture}}'
linux/x86_64
Some additional information - I was able to pull and successfully use microsoft/dotnet image.
That docker image is based on Windows Server Core as the base OS and also uses IIS as the web server, that makes it Windows only, you can use docker pull microsoft/aspnetcore on Linux. As for microsoft/dotnet it's cross platform and i guess it's basically the same as microsoft/aspnetcore but without the ASP stuff (sorry i'm not that familiar with Windows SDKs and Frameworks).

What is the use of manifest list in context of docker containers?

I am trying to pull a image from docker hub using a command on windows server 2016
docker pull alpine
The command returns an error as follows
no supported platform found in manifest list
I am not sure what is manifest list and how is this related? Thanks for help.
This might be due to OS compatibility as specified here
To resolve this try to Right click on Docker and select Switch to Windows containers or try adding the --experimental flag to see if it works.
I had the same problem, I was pulling OpenJDK:8 using windows cmd. The container was Windows. I change the container to Linux container and the problem solved.

Resources