Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

docker notary : tls: oversized record received with length 20527

Tags:

docker

I receive this error when I try to push and sign image in a private registry. Steps to reproduce:

  1. Deploy registry:

    $ docker run -d -p 5000:5000 --restart=always --name registry registry:2
    
  2. Tag the image:

    $ docker tag hello-world localhost:5000/hello-world:latest
    
  3. Enable content trust:

    $ export DOCKER_CONTENT_TRUST=1
    
  4. 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
    
like image 505
BiltiuLena Avatar asked Oct 29 '22 21:10

BiltiuLena


1 Answers

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

like image 81
Miad Abrin Avatar answered Nov 16 '22 10:11

Miad Abrin