docker push, x509: certificate signed by unknown authority

조회 7,654 · 댓글 2
케이시88작성자2019년 10월 28일
x509: certificate signed by unknown authority
케이시882019년 10월 28일
[Ubuntu Linux]

1. /usr/share/ca-certificates 디렉토리에 server.crt 파일 복사
2. echo server.crt >> /etc/ca-certificates.conf
3. update-ca-certificates
4. service docker restart
케이시882019년 10월 28일
[Amazon Linux]


$ sudo docker tag hello-world:latest ip-172-31-8-20:443/kasey88/hello-world:latest

$ sudo docker push ip-172-31-8-20:443/kasey88/hello-world:latest

The push refers to repository [ip-172-31-8-20:443/kasey88/hello-world]
Get https://ip-172-31-8-20:443/v2/: x509: certificate signed by unknown authority


0. /etc/hosts에 ip-172-31-8-20 서버에 대한 ip 정보는 넣어줘야 함
1. 디렉토리 생성 : /etc/docker/certs.d/ip-172-31-8-20:443
2. 디렉토리에 인증서 파일을 넣었다.
1) client.cert
2) client.key
3. crt(cert) 파일의 이름을 server.crt로 바꾸어,
$ sudo cp server.crt /etc/pki/ca-trust/source/anchors/
$ sudo update-ca-trust enable
$ sudo update-ca-trust extract
$ sudo service docker restart

이걸 다 해야하는지 어떤지 모르지만 검색해서 하다보니 됐다.


$ sudo docker push ip-172-31-8-20:443/kasey88/hello-world:latest

The push refers to repository [ip-172-31-8-20:443/kasey88/hello-world]
af0b15c8625b: Pushed
latest: digest: sha256:92c7f9c92844bbbb5d0a101b22f7c2a7949e40f8ea90c8b3bc396879d95e899a size: 524

로그인 후 답글을 남길 수 있습니다.