2

I have the following Dockerfile:

# syntax=docker/dockerfile:1
FROM windows
CMD echo Hello World!

I go to the folder where it is contained and run the command:

docker build -t myapp .

Here is the output I am getting:

#1 [internal] load build definition from Dockerfile
#1 sha256:a1d3c4a6e12f4cddf4afffc562b1433934c473851b755b2abc3f2fde935a1a92
#1 transferring dockerfile: 31B done
#1 DONE 0.0s

#2 [internal] load .dockerignore
#2 sha256:fb211a3db6387cb686b1196a6ecf918d5e247355af1defb5650b7e56a616141b
#2 transferring context: 2B done
#2 DONE 0.0s

#3 [internal] load metadata for docker.io/library/windows:latest
#3 sha256:d7ef60db0c57c36d3b2205b072a719bb2fde4c4f6da14ba36cfb712dae5b2314
#3 ...

#4 [auth] library/windows:pull token for registry-1.docker.io
#4 sha256:f2ddcdfd41cd000ab0347326f1abf8fae77a85d55a3cccd4448d5b972ac3e584
#4 DONE 0.0s

#3 [internal] load metadata for docker.io/library/windows:latest
#3 sha256:d7ef62dd0c57c36a3b2205b072b719bb2fde4b7f6ea31ba36cfb723dae5b2314
#3 ERROR: pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed
------
 > [internal] load metadata for docker.io/library/windows:latest:
------
failed to solve with frontend dockerfile.v0: failed to create LLB definition: pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed

I am very new to Docker, so I can not understand what is causing this error. I do not know how to check if I logged in in Dockedr Hub or not and I do not know how to check if the base image named windows exists.

This question is not helpful at all.

1 My file is called Dockerfile.

2 I do not know what is the buildkit and I do not know where to put the:

export DOCKER_BUILDKIT=0
export COMPOSE_DOCKER_CLI_BUILD=0

3 I just freshly installed the Docker. I tried this sample application tutorial and it worked just fine for me.

4 As you can see in my Dockerfile I am not trying to copy anything.

Also, I am getting the following error:

$ docker pull mcr.microsoft.com/windows
Using default tag: latest
Error response from daemon: manifest 
for mcr.microsoft.com/windows:latest 
not found: manifest unknown: manifest tagged by "latest" is not found

I can not even pull the servercore/insider:

$ docker pull mcr.microsoft.com/windows/servercore/insider
Using default tag: latest
Error response from daemon: manifest for mcr.microsoft.com/windows/servercore/insider:latest not found: manifest unknown: manifest tagged by "latest" is not found

Even though my local Docker is configured to use the Windows containers:

enter image description here

Feels kind of devastating, I do not know why it does not work and how to fix it.

manymanymore
  • 2,251
  • 3
  • 26
  • 48
  • 1
    You seem to be looking for an image that doesn't exist: https://hub.docker.com/_/windows – BMitch Jul 23 '21 at 14:14
  • @BMitch, where can I see a list of all repositories? Also, maybe you happen to know what is windows image alternative then? – manymanymore Jul 23 '21 at 14:16
  • For repositories on hub, you can explore https://hub.docker.com/. There's no single public list of them all (it would be a long list, like asking for a list of all github repositories). – BMitch Jul 23 '21 at 14:17
  • Does this answer your question? [Docker: "no matching manifest for windows/amd64 in the manifest list entries"](https://stackoverflow.com/questions/48066994/docker-no-matching-manifest-for-windows-amd64-in-the-manifest-list-entries) – tripleee Jul 23 '21 at 14:17
  • @BMitch, I tried the `microsoft-windows` (because there is the https://hub.docker.com/_/microsoft-windows) and the result is the same. – manymanymore Jul 23 '21 at 14:18
  • @tripleee, at first I though that it does answer, but now I see that I was wrong. I still have the same issue. – manymanymore Jul 23 '21 at 14:21

1 Answers1

3
FROM windows

is not a valid base image on Docker Hub. You can see the pull attempt here:

#3 [internal] load metadata for docker.io/library/windows:latest
...
#3 ERROR: pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed

For a list of Windows images, I'd look to mcr.microsoft.com, and windows has documented their base images here:

https://learn.microsoft.com/en-us/virtualization/windowscontainers/manage-containers/container-base-images

e.g. for one of the Go images, it uses FROM mcr.microsoft.com/windows/servercore:1809

BMitch
  • 231,797
  • 42
  • 475
  • 450