시놀로지 나스

도커 이미지 다운로드 에러 x509: certificate has expired or is not yet valid

do121 2024. 5. 15. 09:48

어느날 부터 도커 이미지 다운로드가 되지 않아서 임시로 윈도우에 도커를 설치 후 이미지를 받아서 나스로 옮겨서 설치했으나 그것도 귀찮아서 다시 구글링 해보니 아래의 해결법이 있어서 그대로 해봄

 

터미널을 열어서 리눅스 명령어를 실행해야하므로 나스 제어판에서 ssh포트를 열어주고 putty로 접속해야함 

 

https://www.mihaimatei.com/synology-diskstation-dsm-failed-to-download-docker-image/

 

Synology Diskstation DSM Failed to download Docker image

If you get this message when you are using Docker on Synology Diskstation and try to download an image from the Docker Registry, then you might find this solution useful. At first, not knowing why it fails, I went to try downloading the image via ssh conso

www.mihaimatei.com

https://curl.se/docs/caextract.html

 

curl - Extract CA Certs from Mozilla

CA certificates extracted from Mozilla The Mozilla CA certificate store in PEM format (around 200KB uncompressed): cacert.pem This bundle was generated at Mon Mar 11 15:25:27 2024 GMT . This PEM file contains the datestamp of the conversion and we only mak

curl.se

cacert-2024-03-11.pem
0.22MB

 

2024.5.15. 현재 최신 인정서는 2024.3.11. 이고 백업용으로 올려놓음

putty에서 아래대로 

sudo cp /volume1/docker/cacert-2024-03-11.pem /etc/ssl/certs/

ls *2024*
cacert-2024-03-11.pem

 

sudo cat /etc.defaults/ssl/certs/ca-certificates.crt /etc/ssl/certs/cacert-2024-03-11.pem > /volume1/docker/new.crt

sudo cp /volume1/docker/new.crt /etc/ssl/certs/ca-certificates.crt

sudo ln -s /etc/ssl/certs/cacert-2024-03-11.pem /etc/ssl/certs/`openssl x509 -hash -noout -in /etc/ssl/certs/cacert-2024-03-11.pem`.1

ll /etc/ssl/certs/.1

lrwxrwxrwx 1 root root 36 May 15 09:21 /etc/ssl/certs/.1 -> /etc/ssl/certs/cacert-2024-03-11.pem

 

sudo ln -s /etc/ssl/certs/cacert-2024-03-11.pem /etc/ssl/certs/`openssl x509 -hash -noout -in /etc/ssl/certs/cacert-2024-03-11.pem`.1 명령어 실행후 아래의 에러가 발생할수 도 있음 

Error opening Certificate /etc/ssl/certs/cacert-2024-03-11.pem
139773580555920:error:0200100D:system library:fopen:Permission denied:bss_file.c:413:fopen('/etc/ssl/certs/cacert-2024-03-11.pem','r')
139773580555920:error:20074002:BIO routines:FILE_CTRL:system lib:bss_file.c:415:
unable to load certificate

 

무시고하고 

ll /etc/ssl/certs/.1 를 실행해 보면

아래와 같이 생성된 걸 확인할수 있다.

lrwxrwxrwx 1 root root 36 May 15 09:21 /etc/ssl/certs/.1 -> /etc/ssl/certs/cacert-2024-03-11.pem

 

나스 재시작~ 드디어 성공함~~