Docker and CI/CD · Senior · Question 71 of 75
What do BuildKit's --secret and --ssh have in common?
- 1They encrypt the final image with the key you pass in
- 2They sign every layer of the image with a private key
- ✓Correct answer: They give one
RUNcredentials without writing them to layers
Explanation
--ssh forwards an SSH agent for cloning private repos; --secret mounts a file. Both vanish after the step, unlike ARG or COPY.