Score:1

Error: error contacting notary server: x509: certificate signed by unknown authority

in flag

I am puzzled how docker and Notary work together. I can not sign image

docker pull nginx:latest

got

Error: error contacting notary server: x509: certificate signed by unknown authority

I followed these steps

git clone https://github.com/theupdateframework/notary
cd notary $ docker-compose build
docker-compose up -d
mkdir -p ~/.notary && cp cmd/notary/config.json cmd/notary/root-ca.crt ~/.notary

What root-ca.crt represents? How to check this? Does the error means the client does not recognize the issuer of the certificate and considers the certificate to be invalid?

Score:1
by flag

The root-ca.crt file is used to establish trust between your Docker client and the Notary server.

Your problem is that the Docker client does not recognize the issuer of the certificate (Notary server) and considers the certificate to be invalid. The reason being that it is not signed by a trusted certificate authority (the default trust on your system)

We gonna tell docker to trust the root CA certificate used by the Notary server. first we gonna create the directory needed for Docker: sudo mkdir -p /etc/docker/certs.d/your.notary.server.url:4443 then we copy the root-ca.crt to it sudo cp cmd/notary/root-ca.crt /etc/docker/certs.d/your.notary.server.url:4443/ca.crt restart Docker and it should work.

MikiBelavista avatar
in flag
This works but I can not run container.
MikiBelavista avatar
in flag
docker -D run -d --name id identidock DEBU[0000] reading certificate directory: /home/miki/.docker/tls/notary.docker.io
MikiBelavista avatar
in flag
I will post new question later.
Saxtheowl avatar
by flag
check if you have pull the container
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.