Cannot forward gpg-agent when "docker-in-docker" is enabled in devcontainer
What happened?
The exact same issue mentioned in https://github.com/loft-sh/devpod/issues/881#issuecomment-2008166519.
$ devpod ssh devpod-issue --debug
<omitted>
19:06:17 info Initializing gpg-agent forwarding
19:06:17 info Decoding input public key
19:06:17 info Decoding input owner trust
19:06:17 info Stopping container gpg-agent
19:06:17 info gpg: importing gpg public key in container
19:06:17 info gpg: importing gpg owner trust in container
19:06:17 info Ensuring paths existence and permissions
19:06:17 info Ensure stopping container gpg-agent
19:06:17 info Setup local gnupg socket links
19:06:17 debug Received ping from agent
19:06:17 debug Connection to container closed
19:06:17 debug done inject
19:06:17 fatal error forwarding /Users/pan93412/.gnupg/S.gpg-agent.extra: EOF
19:06:17 debug done injecting
What did you expect to happen instead?
I should be able to log in into my container.
How can we reproduce the bug? (as minimally and precisely as possible)
https://github.com/pan93412/devpod-regression-20240607
My devcontainer.json:
{
"image":"mcr.microsoft.com/devcontainers/go",
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {}
}
}
Local Environment:
- DevPod Version: v0.5.12
- Operating System: Mac
- ARCH of the OS: ARM64
DevPod Provider:
- Cloud Provider: aws
Anything else we need to know?
Hi @pan93412, thanks for opening the issue. I can reproduce it on my side as well, we'll take a look
@pascalbreuninger Did you ever get a chance to take a closer look? - I ran into this today too (and it's somewhat of a workflow blocker, so can spend a bit of time digging in, but any other context would be helpful)
Finally had a chance to tackle this, the attached PR should fix this issue with the next release :)