How do you use SSH keys to clone a private repo during build?
IntermediateConceptDockerfile Instructions & Builds
Answer
Forward the agent via BuildKit's SSH mount; the key never lands in the image.
RUN --mount=type=ssh git clone [email protected]:org/private.git
docker build --ssh default .