Docker Engine
SSH agent
Licobox exposes the host SSH agent through /run/host-services/ssh-auth.sock. Mount that socket into the container and point SSH_AUTH_SOCK at it.
Configure the container
Section titled “Configure the container”docker run -it --rm \ -v /run/host-services/ssh-auth.sock:/run/host-services/ssh-auth.sock \ -e SSH_AUTH_SOCK=/run/host-services/ssh-auth.sock \ alpineservices: web: image: alpine volumes: - type: bind source: /run/host-services/ssh-auth.sock target: /run/host-services/ssh-auth.sock environment: - SSH_AUTH_SOCK=/run/host-services/ssh-auth.sockVerify
Section titled “Verify”- Start a shell in the container.
- Run
ssh-add -l.
ssh-add -lIf keys are listed, the agent is forwarded. If not, confirm the socket exists on the host and that the mount is present in the container.