This file contains hidden or 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 [email protected]:your-repo.git |
This file contains hidden or 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 run --rm -ti \ | |
-v $(SSH_AUTH_SOCKET):/ssh-socket -e SSH_AUTH_SOCKET=/ssh-socket \ | |
--user $UID:$GROUPS \ | |
asterbini/image \ | |
bash |