× - 코드 및 콘솔 화면은 [ code ] 내용 [ /code ] 태그 처리하여 주세요.
- 강조하고자 하는 내용은 [ b ] 내용 [ /b ] 태그 처리하여 주세요.

docker push, x509: certificate signed by unknown authority

  • 케이시88
    (케이시88)
  • 케이시88's Avatar 이 글의 작성자
  • Offline
  • Newbie
  • Newbie
더보기
29 Oct 2019 01:46 #4909 작성자: 케이시88
케이시88 님의 글: docker push, x509: certificate signed by unknown authority
x509: certificate signed by unknown authority
  • 케이시88
    (케이시88)
  • 케이시88's Avatar 이 글의 작성자
  • Offline
  • Newbie
  • Newbie
더보기
29 Oct 2019 01:48 - 29 Oct 2019 08:32 #4910 작성자: 케이시88
케이시88 님의 답글: docker push, x509: certificate signed by unknown authority
[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
  • 케이시88
    (케이시88)
  • 케이시88's Avatar 이 글의 작성자
  • Offline
  • Newbie
  • Newbie
더보기
29 Oct 2019 08:37 - 29 Oct 2019 08:38 #4912 작성자: 케이시88
케이시88 님의 답글: docker push, x509: certificate signed by unknown authority
[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
Time to create page: 0.054 seconds
Powered by Kunena Forum