File tree Expand file tree Collapse file tree 2 files changed +23
-19
lines changed
Expand file tree Collapse file tree 2 files changed +23
-19
lines changed Original file line number Diff line number Diff line change @@ -78,24 +78,7 @@ For more information and examples, see
7878
7979### Can I use an SSH agent inside a container?
8080
81- Yes, you can use the host’s SSH agent inside a container. To do this:
82-
83- 1 . Bind mount the SSH agent socket by adding the following parameter to your ` docker run ` command:
84-
85- ` -v /run/host-services/ssh-auth.sock:/run/host-services/ssh-auth.sock `
86-
87- 1 . Add the ` SSH_AUTH_SOCK ` environment variable in your container:
88-
89- ` -e SSH_AUTH_SOCK="/run/host-services/ssh-auth.sock" `
90-
91- To enable the SSH agent in Docker Compose, add the following flags to your service:
92-
93- ```
94- volumes:
95- - /run/host-services/ssh-auth.sock:/run/host-services/ssh-auth.sock
96- environment:
97- - SSH_AUTH_SOCK=/run/host-services/ssh-auth.sock
98- ```
81+ Yes, you can use the host’s SSH agent inside a container. For more information, see [ SSH agent forwarding] ( /docker-for-mac/networking/#ssh-agent-forwarding ) .
9982
10083### How do I add custom CA certificates?
10184
Original file line number Diff line number Diff line change @@ -39,9 +39,30 @@ $ docker run -p 8000:80 -d nginx
3939Now, connections to ` localhost:8000 ` are sent to port 80 in the container. The
4040syntax for ` -p ` is ` HOST_PORT:CLIENT_PORT ` .
4141
42+ ### SSH agent forwarding
43+
44+ Docker Desktop for {{Arch}} allows you to use the host’s SSH agent inside a container. To do this:
45+
46+ 1 . Bind mount the SSH agent socket by adding the following parameter to your ` docker run ` command:
47+
48+ ` -v /run/host-services/ssh-auth.sock:/run/host-services/ssh-auth.sock `
49+
50+ 1 . Add the ` SSH_AUTH_SOCK ` environment variable in your container:
51+
52+ ` -e SSH_AUTH_SOCK="/run/host-services/ssh-auth.sock" `
53+
54+ To enable the SSH agent in Docker Compose, add the following flags to your service:
55+
56+ ```
57+ volumes:
58+ - /run/host-services/ssh-auth.sock:/run/host-services/ssh-auth.sock
59+ environment:
60+ - SSH_AUTH_SOCK=/run/host-services/ssh-auth.sock
61+ ```
62+
4263### HTTP/HTTPS Proxy Support
4364
44- See [ Proxies] ( index#proxies ) .
65+ See [ Proxies] ( /docker-for-mac/ index/ #proxies) .
4566
4667## Known limitations, use cases, and workarounds
4768
You can’t perform that action at this time.
0 commit comments