Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix ssh agent forwarding on macOS #105

Merged
merged 1 commit into from
Sep 21, 2022
Merged

fix: fix ssh agent forwarding on macOS #105

merged 1 commit into from
Sep 21, 2022

Conversation

lsorber
Copy link
Member

@lsorber lsorber commented Sep 2, 2022

Problem [1]:

  1. We need to use a non-root user in the container so that files written in a mounted volume on Linux are owned by the host's user instead of root.
  2. The Docker for Mac docs explain that you need to mount /run/host-services/ssh-auth.sock to forward the host's SSH agent.
  3. Docker for Mac will mount that socket as root, which means that the non-root container user doesn't have permission to use the mounted SSH agent socket.

Solution: on startup, we chown the socket to the non-root user app.

[1] docker/for-mac#5303 (comment)

@lsorber lsorber requested a review from sinopeus September 2, 2022 09:41
@lsorber lsorber self-assigned this Sep 2, 2022
@lsorber lsorber requested a review from tanguyNaets September 20, 2022 07:45
@lsorber lsorber merged commit 6ca598b into main Sep 21, 2022
@lsorber lsorber deleted the ls-fix-ssh-agent branch September 21, 2022 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants