Sebastian Feldmann
04/08/2026, 5:30 PMbash
docker compose run -it --entrypoint "app" --no-deps --remove-orphans \
-v /run/host-services/ssh-auth.sock:/agent.sock \
-v ~/.ssh/known_hosts:/root/.ssh/known_hosts:ro \
-e SSH_AUTH_SOCK=/agent.sock \
app.local install
I can't get the same thing to work in a docker compose file. The know hosts file work but my key is not forwarded into the running container.
yml
environment:
SSH_AUTH_SOCK: /agent.sock
volumes:
- ~/.ssh/known_hosts:/root/.ssh/known_hosts:ro
- /run/host-services/ssh-auth.sock:/agent.sock
I also tried $SSH_AUTH_SOCK instead of the /run/host-services/ssh-auth but also without any success.
On my host machine $SSH_AUTH_SOCK is set and it points to an active socket (/var/run/com.apple.launchd.xxxxxxxxx/Listeners)
The key is added to the agent and is listed using ssh-add -l
I can't figure out why it does not work. Does anybody have any suggestions?
orbstack Version 2.0.5 (19905)
MacOS 26.4 (25E246)