DCA · Question #14
When using the Docker client to push an image to a registry, what environment variable is used to instruct the client to perform signing of the image?
The correct answer is A. DOCKER_CONTENT_TRUST=1. To enable Docker Content Trust for signing images when pushing to a registry, the DOCKER_CONTENT_TRUST environment variable must be set to 1.
Question
When using the Docker client to push an image to a registry, what environment variable is used to instruct the client to perform signing of the image?
Options
- ADOCKER_CONTENT_TRUST=1
- BDOCKER_IMAGE_SIGN=1
- CDOCKER_PUSH_SIGN=1
- DNOTARY_ENABLE=1
How the community answered
(25 responses)- A92% (23)
- C4% (1)
- D4% (1)
Why each option
To enable Docker Content Trust for signing images when pushing to a registry, the `DOCKER_CONTENT_TRUST` environment variable must be set to `1`.
Setting the `DOCKER_CONTENT_TRUST` environment variable to `1` explicitly activates Docker Content Trust, which then prompts the Docker client to cryptographically sign images before pushing them to a registry, ensuring integrity and authenticity.
`DOCKER_IMAGE_SIGN` is not a recognized or standard environment variable for enabling Docker Content Trust.
`DOCKER_PUSH_SIGN` is not a recognized or standard environment variable for enabling Docker Content Trust.
While Notary is the underlying technology for Docker Content Trust, `NOTARY_ENABLE` is not the correct environment variable for activating it in the Docker client.
Concept tested: Docker Content Trust environment variable
Source: https://docs.docker.com/engine/security/trust/content_trust/#enable-content-trust-for-pushes
Topics
Community Discussion
No community discussion yet for this question.