nerves-project / nerves

Craft and deploy bulletproof embedded software in Elixir
http://nerves-project.org
Apache License 2.0
2.26k stars 193 forks source link

docker: Don't use ssh-agent, instead mount ~/.ssh #972

Closed ringlej closed 5 months ago

ringlej commented 5 months ago

Building on a mac will result in this failure:

docker: Error response from daemon: error while creating mount source path '/host_mnt/private/tmp/com.apple.launchd.lINaqsIhwG/Listeners': mkdir /host_mnt/private/tmp/com.apple.launchd.lINaqsIhwG/Listeners: operation not supported.

This is failing because Apple doesn't support passing a unix socket across a hypervisor. This happens when trying to use SSH_AUTH_SOCK to mount the ssh-agent (unix) socket for authentication.

Instead, mount the user's ~/.ssh directory so that ssh has access to the user's private keys during the docker container instance running the build.

fhunleth commented 5 months ago

@jjcarstens Is this ok to merge?