Reputation: 41
I'am struggling with this problem. I have to push a docker image (which work rigthly with docker-compose up) to my local registry which was setup with the following command:
docker run -d -p 5000:5000 --restart=always --name registry registry:2
This is the output of 'docker ps'
5fe319f37d5c registry:latest "/entrypoint.sh /etc/" 41 hours ago Up About an hour 0.0.0.0:5000->5000/tcp registry
I follow the steps to push the image:
docker-compose up --build
docker tag gatewayapi_api localhost:5000/gatewayapi_api
docker push localhost:5000/gatewayapi_api
but in every case I obtain
file integrity checksum failed for "etc/default/cacerts
I try every solution (restart docker, clean image, restart registry)
Thanks in advance.
Upvotes: 4
Views: 3887
Reputation: 1
Faced the same problem in Ubuntu 20.04 with package docker.io. Would have error "file integrity checksum failed" when pushing image to my private docker registry. In my case the problem was fixed by following this official fix from Docker web site:
Note that my Docker private registry was running as a container as above:
docker run -d -p 5000:5000 --restart=always --name registry registry:2
I was building and pushing Docker images from the same Docker engine on the same Ubuntu 20.04 computer, communicating through the socket (not the ethernet).
I don't know if the problem was from the Docker client building the image or from the Docker private registry receiving the image, which was itself running as a container. In any case, following the above official fix was the only thing I needed to get the problem resolved, I changed nothing else.
Log into the Ubuntu or Debian host as a user with sudo privileges.
Edit the /etc/default/grub file. Add or edit the GRUB_CMDLINE_LINUX line to add the following two key-value pairs:
GRUB_CMDLINE_LINUX="cgroup_enable=memory swapaccount=1"
$ sudo update-grub
Upvotes: 0
Reputation: 6128
In this GitHub issue people are sharing their findings how to fix that issue.
TL;DR:
docker system prune -a
Upvotes: 7
Reputation: 19144
Does your registry work correctly with an official image? Like this:
docker pull alpine
docker tag alpine localhost:5000/my-alpine
docker push localhost:5000/my-alpine
Upvotes: 1