Last active
March 10, 2022 18:52
-
-
Save asterbini/3f6f89c4fad71b3c079a132d08be2537 to your computer and use it in GitHub Desktop.
Forward SSH authentication when building a Docker image
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker build --ssh default -t asterbini/image . | |
then in your Dockerfile you can do | |
RUN --mount=type=ssh git clone git@github.com:your-repo.git |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment