Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions desktop/mac/networking.md
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
Expand Down