I've run into problems trying to support the ssh-agent SSH_AUTH_SOCK specifically with 'Docker for Mac'. Currently docker.sock is forwarded, it's probably not that hard to achieve same solution for other sockets too. We want to make our scripts / files as much platform-independent as possible and this complicates things Would be a lot better if docker for mac provided native support for ssh agent forwarding or socket forwarding in general as mentioned in P.S.It runs separate ssh-agent and shares your local key to that agent.It requires to append additional parameters on every docker run command which complicates stuff like running containers through docker-compose.Solution that you provided works, but it's not convenient / experimental A different solution would be to run ssh-agent in a container and to access that from MacOS and the other containers - it's probably a bit more invasive but works. One of the solutions that people point out is docker-ssh-agent-forward. The trouble is that when using SSH Agent, the agent's container (running as root) is unable to share the SSH authentication socket with an inner container, unless as I mentioned the inner container also runs as root. Hi Denis, I should have specified - I am using the workaround of mounting the Docker socket as a volume.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |