Skip to content

Instantly share code, notes, and snippets.

@zamd
Created July 13, 2017 10:57
Show Gist options
  • Save zamd/cb1687ac1ffc2af1385499a221ac98f4 to your computer and use it in GitHub Desktop.
Save zamd/cb1687ac1ffc2af1385499a221ac98f4 to your computer and use it in GitHub Desktop.
trusting root ca certs in docker

Trusting custom root CA certificate in docker containers

Most large enterprises run their own PKI infrastructure and it’s common to issue internal CA signed certificate to services - The Root CA certificate is pushed to domain-joined workstations with group policy etc.

For non-domain joined services (like linux hosts etc.) it’s common to manually trust root CA cert.

Docker deamon automatically picks up the trusted root CA list from the host and use it as it's trusted CA list... Following commands can be used to add a custom CA certficate as trusted CA in Ubuntu

  • Go to /usr/share/ca-certificates/
  • Add your custom CA cert to this folder as PEM encoded file with .crt extension
  • sudo update-ca-certificates

Now restart the docker deamon and it should pick up the newly uploaded CA cert

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment