Add CA-Certificate (SSL-Inspection) for the docker-egine

Hello all,

i’am using here docker on my KDE Neon (basend on Ubuntu 22.04 LTS) with pycharm. Docker is installed directly from the packagessource from docker. Here in the office we have SSL-Deepinspection for security. So docker can’t download things from the internet:

docker run hello-world

Unable to find image 'hello-world:latest' locally
docker: Error response from daemon: Head "": Get "": EOF.

Form other applications the CA is automaticly used. But Docker does not seem to access the central certificate store.

For testing i have created this folder
and put my CA there, but that also shows no change.

How can I pass docker my CA with so it can also load things from the internet?

Thanks and best Regards

From ChatGPT, not tested:

You need to configure the Docker daemon to use your CA files. To do this, create or edit the Docker daemon configuration file, typically located at /etc/docker/daemon.json or /etc/systemd/system/docker.service.d/docker.conf on Linux. Add or modify the “tls” section to include the paths to your CA files:

  "tls": true,
  "tlscacert": "/path/to/your/ca.crt",
  "tlscakey": "/path/to/your/ca.key",
  // Other Docker daemon configurations...

Then restart your Docker daemon.

Have you followed the instructions Verify repository client with certificates | Docker Docs, and added the subfolder and placed the cert inside the folder with a filename that ends on .crt?

It should look like this /etc/docker/certs.d/

Though, this only handles docker engine to registry communication. Every container that needs to make https calls to the internet needs to be modified as well.

1 Like

This was what i have missed. Very thanks, it works now perfectly.