Getting docker error, daemon is missing signature key on docker pull - docker

I have been trying to pull a docker image; which has been pushed successfully to the private jfrog repository using the same terminal and in same session. There comes no issues while pushing the image, however on doing a pull it is getting failed with the following region.
[xxxx#xxxx~]$ sudo docker pull docker-repo/xxxx-xxxx-xxx/xx/tomcat-xx:latest
Error response from daemon: missing signature key
If anyone can help what could be reason for this? The difference I can see wrt to the image I pushed through this terminal and the images which are already present in jfrog repo is that manifest has cetain properties associated with them. However, there are no properties present in jfrog repo wrt to image I pushed from this terminal.
Following are the details for reference:
$ sudo docker version
Client: Docker Engine - Community
Version: 19.03.5
API version: 1.40
Go version: go1.12.12
Git commit: 633a0ea
Built: Wed Nov 13 07:25:41 2019
OS/Arch: linux/amd64
Experimental: false
Server: Docker Engine - Community
Engine:
Version: 19.03.5
API version: 1.40 (minimum version 1.12)
Go version: go1.12.12
Git commit: 633a0ea
Built: Wed Nov 13 07:24:18 2019
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.2.10
GitCommit: b34a5c8af56e510852c35414db4c1f4fa6172339
runc:
Version: 1.0.0-rc8+dev
GitCommit: 3e425f80a8c931f88e6d94a8c831b9d5aa481657
docker-init:
Version: 0.18.0
GitCommit: fec3683
Is there anything I am missing at configuration end. Kindly help.
Thanks.

I had the same problem with JFrog Artifactory. For me, it helped to give annotate permissions to the user pushing the image, as suggested here.

Related

Docker pull throwing EOF exceptions

I recently installed Docker on my setup from https://docs.docker.com/desktop/install/mac-install/. When I try to pull any image in my terminal, it throws following error:
(base) harshgoyal#lawn-128-61-61-143 ~ % docker pull docker/getting-started
Using default tag: latest
Error response from daemon: Get "https://registry-1.docker.io/v2/": EOF
(base) harshgoyal#lawn-128-61-61-143 ~ %
(base) harshgoyal#lawn-128-61-61-143 ~ % docker version
Client: Docker Engine - Community
Version: 20.10.23
API version: 1.41
Go version: go1.19.5
Git commit: 715524332f
Built: Wed Jan 18 20:42:16 2023
OS/Arch: darwin/arm64
Context: default
Experimental: true
Server: Docker Desktop 4.16.2 (95914)
Engine:
Version: 20.10.22
API version: 1.41 (minimum version 1.12)
Go version: go1.18.9
Git commit: 42c8b31
Built: Thu Dec 15 22:25:43 2022
OS/Arch: linux/arm64
Experimental: false
containerd:
Version: 1.6.14
GitCommit: 9ba4b250366a5ddde94bb7c9d1def331423aa323
runc:
Version: 1.1.4
GitCommit: v1.1.4-0-g5fd4c4d
docker-init:
Version: 0.19.0
GitCommit: de40ad0
(base) harshgoyal#lawn-128-61-61-143 ~ %
System: Macbook Air M1 silicon chip with MacOS Ventura
Solutions tried:
Restarting docker
Reinstalling docker after cleaning all cache files.
Nothing has helped yet. Could someone please help me debug this issue?
Please try to switch the network if you are facing this issue. It worked once I moved to personal hotspot. Seems my university network caused the problem.
Reference thread: https://forums.docker.com/t/docker-pull-throwing-eof-exceptions/134219

docker-compose push incorrect image size

I've used docker-compose push for years now with no issues, till today. I'm confused by this one. Basically it looks like it's only pushing the local changes in my Dockerfile, but not the entire image based on my Dockerfile and the original source image.
$ docker-compose build
...
...
Successfully tagged registry.gitlab.com/<path_obfuscated>:21.10.02
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
...
registry.gitlab.com/<obfuscated-path---------------------------> 21.10.02 3c8d770f0649 23 minutes ago 1.2GB
...
So you can see the image is 1.2 GB.
Now I run: docker-compose push
It happens superfast, and when I look at the image on my registry, it's only 388 MB, instead of the expected 1.2 GB.
Does someone know why this is happening? I've been using the same method for years now, and this is the first that I ran into this issue.
Some extra bits:
$ docker version
Client:
Version: 20.10.8
API version: 1.41
Go version: go1.16.6
Git commit: 3967b7d28e
Built: Wed Aug 4 21:24:10 2021
OS/Arch: linux/amd64
Context: default
Experimental: true
Server:
Engine:
Version: 20.10.8
API version: 1.41 (minimum version 1.12)
Go version: go1.16.6
Git commit: 75249d8
Built: Wed Aug 4 21:26:30 2021
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: v1.4.9
GitCommit: e25210fe30a0a703442421b0f60afac609f950a3
runc:
Version: 1.0.1
GitCommit:
docker-init:
Version: 0.19.0
GitCommit: de40ad0
$ docker-compose --version
docker-compose version 1.25.5, build unknown
According to this issue in Docker GitHub:
docker images shows the uncompressed size. During a docker push, the engine compresses (gzip) the image before sending to the registry. The size shown in the Hub UI is the compressed size, and roughly represents how much work a fresh docker pull would need to do. The network transfer size is probably the more important number when deploying containers.

Docker not logging into local repository

I have just set up a local VM running Nexus. I have configured a Docker repository on port 5000. I have a separate VM running Docker. I have configured the repository in /etc/docker/daemon.json as so:
{
"insecure-registries": ["192.168.0.5:5000", "nexus:5000"]
}
I then restarted the Docker service. and I have run the command:
docker login 192.168.0.5:5000
I am prompted for a username and password, and when I enter them it returns with::
Error response from daemon: Get https://registry-1.docker.io/v2/: unauthorized: incorrect username or password
I have checked the Docker documentation, and other online resources on how to login to a local docker repository, but I have exactly the same configuration and it just always throws this error.
If I try to push my image, it attempts to contact the local repository, but it complains there are no credentials (as well it should):
[root#docker repo]$ docker tag repo 192.168.0.5:5000/repo
[root#docker repo]$ docker image push 192.168.0.5:5000/repo
Using default tag: latest
The push refers to repository [192.168.0.5:5000/repo]
7d5760c4aa8d: Preparing
3102e53269f4: Preparing
2f140462f3bc: Preparing
63c99163f472: Preparing
ccdbb80308cc: Preparing
no basic auth credentials
Am I missing something?
I am experiencing the same but only with MacOS "Docker Desktop" installations. On Windows it's working as expected.
Client:
Cloud integration: 1.0.17
Version: 20.10.8
API version: 1.41
Go version: go1.16.6
Git commit: 3967b7d
Built: Fri Jul 30 19:55:20 2021
OS/Arch: darwin/amd64
Context: default
Experimental: true
Server: Docker Engine - Community
Engine:
Version: 20.10.8
API version: 1.41 (minimum version 1.12)
Go version: go1.16.6
Git commit: 75249d8
Built: Fri Jul 30 19:52:31 2021
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.4.9
GitCommit: e25210fe30a0a703442421b0f60afac609f950a3
runc:
Version: 1.0.1
GitCommit: v1.0.1-0-g4144b63
docker-init:
Version: 0.19.0
GitCommit: de40ad0
As I am trying to login to a local registry (using Artifactory) I've checked the reverse proxy's logs. The MacOS client doesn't even try to reach the local registry.

Why does FROM registry.hub.docker.com/library/centos:centos7 fail in my docker build?

The following line in my Dockerfile:
FROM registry.hub.docker.com/library/centos:centos7
fails with the following error:
Sending build context to Docker daemon 1.664MB
Step 1/17 : FROM registry.hub.docker.com/library/centos:centos7
Get https://registry.hub.docker.com/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
I am running behind a proxy and I tried to follow the instructions on this website, but still no success (same error). So I have a file in my ~/.docker/config.json that pretty much looks like what the link says, and I inserted my internal proxy IP address information. However, I still get the same "request canceled" error message shown above.
Here is some information about my CentOS 7 system:
Linux localhost.localdomain 3.10.0-1160.15.2.el7.x86_64 #1 SMP Wed Feb 3 15:06:38 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
docker version
Client: Docker Engine - Community
Version: 20.10.5
API version: 1.41
Go version: go1.13.15
Git commit: 55c4c88
Built: Tue Mar 2 20:33:55 2021
OS/Arch: linux/amd64
Context: default
Experimental: true
Server: Docker Engine - Community
Engine:
Version: 20.10.5
API version: 1.41 (minimum version 1.12)
Go version: go1.13.15
Git commit: 363e9a8
Built: Tue Mar 2 20:32:17 2021
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.4.4
GitCommit: 05f951a3781f4f2c1911b05e61c160e9c30eaa8e
runc:
Version: 1.0.0-rc93
GitCommit: 12644e614e25b05da6fd08a38ffa0cfe1903fdec
docker-init:
Version: 0.19.0
As richyen said, the correct image is centos:7 and should make it work.
You are speaking about a proxy : the method you used to set a proxy up works, but if your system uses systemd (which is centos7 case I think) you should use this method to set your docker proxy up. I had a lot of troubles with that in the past.

Docker Hello-world fails with "no such file or directory"

OS: Ubuntu cinammon 20.04
I followed the directions from here: docker documentation
When I get to the step to run the Hello-world image.
$ sudo docker run hello-world docker: Error response from daemon: open /var/lib/docker/aufs/layers/9cd449051217b6dc5c24c81e1a02ef897eeb90ee62421d6a227ddfbeddc2b70c-init: no such file or directory. See 'docker run --help'.
`
I've stopped and started the daemon.
sudo service docker stop sudo service docker start
and
systemctl restart docker
The image exists locally per:
$ sudo docker images REPOSITORY TAG IMAGE ID CREATED SIZE hello-world latest bf756fb1ae65 6 months ago 13.3kB
I've been Googling this and getting nowhere. I've seen other places where restarting the daemon fixes it, but I'm just not that lucky.
Any ideas??
More info:
$ sudo docker version
Client: Docker Engine - Community
Version: 19.03.12
API version: 1.40
Go version: go1.13.10
Git commit: 48a66213fe
Built: Mon Jun 22 15:45:44 2020
OS/Arch: linux/amd64
Experimental: false
Server: Docker Engine - Community
Engine:
Version: 19.03.12
API version: 1.40 (minimum version 1.12)
Go version: go1.13.10
Git commit: 48a66213fe
Built: Mon Jun 22 15:44:15 2020
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.2.13
GitCommit: 7ad184331fa3e55e52b890ea95e65ba581ae3429
runc:
Version: 1.0.0-rc10
GitCommit: dc9208a3303feef5b3839f4323d9beb36df0a9dd
docker-init:
Version: 0.18.0
GitCommit: fec3683

Resources