I receive this error when I try to push and sign image in a private registry. Steps to reproduce:
Deploy registry:
$ docker run -d -p 5000:5000 --restart=always --name registry registry:2
Tag the image:
$ docker tag hello-world localhost:5000/hello-world:latest
Enable content trust:
$ export DOCKER_CONTENT_TRUST=1
Push on registry:
$ docker push localhost:5000/hello-world:latest
=> The push refers to a repository [localhost:5000/hello-world]
a02596fdd012: Pushed
latest: digest: sha256:a18ed77532f6d6781500db650194e0f9396ba5f05f8b50d4046b294ae5f83aa4 size: 524
Signing and pushing trust metadata
tls: oversized record received with length 20527
Your registry is not accepting https connections since it is on http. forget about the DOCKER_CONTENT_TRUST
and add your registry as an insecure registry using --insecure-registry
daemon option in your docker daemon config and then restart docker afterwards
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With