notary: Error establishing connection to trust repository
followed following steps to setup notary :
- git clone https://github.com/docker/notary.git
- cd notary
- echo “127.0.0.1 notaryserver” >> /etc/hosts
- cp fixtures/root-ca.crt ~/.docker/tls/notaryserver:4443
- cp fixtures/root-ca.crt /etc/pki/ca-trust/source/anchors/.
- update-ca-trust extract
- docker-compose up
- export DOCKER_CONTENT_TRUST_SERVER=https://notaryserver:4443
- export DOCKER_CONTENT_TRUST=1
- openssl s_client -connect notaryserver:4443 -CAfile fixtures/root-ca.crt -no_ssl3 -no_ssl2 giving correct output with “Verify return code: 0 (ok)”
but when i run docker build command, i am getting below error
Error establishing connection to trust repository: readdirent: not a directory
Sending build context to Docker daemon
An error occurred trying to connect: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.24/build?buildargs=%7B%7D&cgroupparent=&cpuperiod=0&cpuquota=0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=Dockerfile&labels=%7B%7D&memory=0&memswap=0&rm=1&shmsize=0&ulimits=null: readdirent: not a directory
I have no idea which directory it is looking, Can someone please let me know what i am missing here?
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 21 (12 by maintainers)
I think this
cp fixtures/root-ca.crt ~/.docker/tls/notaryserver:4443might also be an issue (especially given the error). If my memory serves,notaryserver:4443need to be a directory, so that command should really be:@hridyeshpant: if you suspect you have unwanted data locally and on your server, you can delete the data with this command. I would recommend doing this before trying @judavi’s commands:
notary -s https://notaryserver:4443 -d ~/.docker/trust delete test.com/collection --remote