DCA practice question 21 of 25

You are pulling images from a Docker Trusted Registry installation configured to use self-signed certificates, and this error appears: `x509: certificate signed by unknown authority. You already downloaded the Docker Trusted Registry certificate authority certificate from https://dtr.example.com/ca. How do you trust it? (Select two.)

Full set: 191 questions
Answer options
A: Pass '-trust-certificate ca.crt to the Docker client.
B: Place the certificate in '/etc/docker/dtr/dtr.example.com.crt' and restart theDocker daemon on all cluster nodes.
C: Place the certificate in /etc/docker/certs.d/dtr.example.com/ca.crt' on allcluster nodes. Correct answer
D: Pass -- insecure-registry to the Docker client.
E: Place the certificate in your OS certificate path, trust the certificate system-wide, and restart the Docker daemon across all cluster nodes. Correct answer
Correct Answer:
C. Place the certificate in /etc/docker/certs.d/dtr.example.com/ca.crt' on allcluster nodes.; E. Place the certificate in your OS certificate path, trust the certificate system-wide, and restart the Docker daemon across all cluster nodes.
Explanation

To make the Docker daemon trust a private registry's self-signed certificate, you must provide it with the registry's Certificate Authority (CA) certificate. The Docker daemon supports two primary methods for this. The Docker-specific approach (C) is to place the CA certificate in a directory named after the registry's host and port, at /etc/docker/certs.d/dtr.example.com/ca.crt. The more general approach (E) is to install the CA certificate into the host operating system's system-wide trust store. The Docker daemon respects the system's trusted CAs. A daemon restart is required in both cases.

Why Incorrect

A. The docker client CLI does not have a --trust-certificate flag or a similar option for providing certificates on the fly.
B. The directory /etc/docker/dtr/ is not a standard location where the Docker daemon looks for registry certificates.
D. --insecure-registry is a daemon configuration option, not a client flag. It instructs Docker to ignore certificate errors entirely, which is different from explicitly trusting a specific CA.

References

1. Docker Docs, "Verify repository client with certificates". This document explicitly states: "A client can also trust a registry without using insecure-registries. This is done by placing a certificate at /etc/docker/certs.d/my-registry.example.com:5000/ca.crt". This directly supports option C.

2. Docker Docs, "Test an insecure registry", Section "Use self-signed certificates". This section notes, "Docker reads the certificate files in this directory (/etc/docker/certs.d/...) when it starts up." It also mentions, "Another option is to trust the certificate system-wide by adding it to your OS’s trust store." This supports option E.

3. Mirantis Kubernetes Engine Documentation, "Configure the Docker client". This guide for the successor to DTR also details both methods: adding the CA to /etc/docker/certs.d/{DTRHOST}/ca.crt or adding it to the OS's trust store. (Specific section: Prerequisites > Configure the Docker client).

Scroll to Top