mirror of https://github.com/docker/docs.git
recovered ssh agent forwarding documentation
The documentation about ssh agent forwarding got lost when osxfs.md was deleted.
So I just want to add the old documentation again at some place where users might look for it.
This is the commit of the old documentation:
4dc6844905 (diff-124453101199ad6385df8981138b4ede623649e8b8b62ee7782be41830034b3a)
This commit is contained in:
parent
8d50f10ae4
commit
86cac4de75
|
@ -44,6 +44,32 @@ syntax for `-p` is `HOST_PORT:CLIENT_PORT`.
|
|||
|
||||
See [Proxies](index.md#proxies).
|
||||
|
||||
### SSH agent forwarding
|
||||
|
||||
Docker Desktop for Mac allows you to use the host’s SSH agent inside a container. To do this:
|
||||
|
||||
1. Bind mount the SSH agent socket by adding the following parameter to your `docker run` command:
|
||||
|
||||
`--mount type=bind,src=/run/host-services/ssh-auth.sock,target=/run/host-services/ssh-auth.sock`
|
||||
|
||||
1. Add the `SSH_AUTH_SOCK` environment variable in your container:
|
||||
|
||||
`-e SSH_AUTH_SOCK="/run/host-services/ssh-auth.sock"`
|
||||
|
||||
To enable the SSH agent in Docker Compose, add the following flags to your service:
|
||||
|
||||
```yaml
|
||||
services:
|
||||
web:
|
||||
image: nginx: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.sock
|
||||
```
|
||||
|
||||
## Known limitations, use cases, and workarounds
|
||||
|
||||
Following is a summary of current limitations on the Docker Desktop for {{Arch}}
|
||||
|
|
Loading…
Reference in New Issue