SSH agent forwarding during docker build -
while building docker image through dockerfile, have clone github repo. have added public ssh keys git hub account , able clone repo docker host. while see can use docker host's ssh key mapping $ssh_auth_sock
env variable @ time of docker run docker run --rm -it --name container_name \ -v $(dirname $ssh_auth_sock):$(dirname $ssh_auth_sock) \ -e ssh_auth_sock=$ssh_auth_sock my_image
.
how can same during docker build ?
Comments
Post a Comment