Menambahkan Certificate Authority (CA) ke Docker penting untuk memastikan bahwa Docker dapat melakukan komunikasi aman dengan registri atau layanan lain yang menggunakan sertifikat SSL/TLS yang diterbitkan oleh CA tersebut.

root@kubeworker08:~# docker login my-regs.wachid.web.id                                           Username: ngadimin
Password:
Error response from daemon: Get "https://my-regs.wachid.web.id/v2/": tls: failed to verify certificate: x509: certificate signed by unknown authority
root@kubeworker08:~#
root@kubeworker08:~# mkdir /etc/docker/certs.d/my-regs.wachid.web.id
root@kubeworker08:~# echo | openssl s_client -connect my-regs.wachid.web.id:443 -showcerts | awk '/-----BEGIN CERTIFICATE-----/,/-----END CERTIFICATE-----/{print}' > /etc/docker/certs.d/my-regs.wachid.web.id/ca.crt
depth=0 CN = wachid.web.id
verify error:num=20:unable to get local issuer certificate
verify return:1
depth=0 CN = wachid.web.id
verify error:num=21:unable to verify the first certificate
verify return:1
depth=0 CN = wachid.web.id
verify return:1
DONE
root@kubeworker08:~#

Leave a Reply

Your email address will not be published. Required fields are marked *