loft-sh / devpod

Codespaces but open-source, client-only and unopinionated: Works with any IDE and lets you use any cloud, kubernetes or just localhost docker.
https://devpod.sh
Mozilla Public License 2.0
8.42k stars 305 forks source link

Cannot forward gpg-agent when "docker-in-docker" is enabled in devcontainer #1114

Open pan93412 opened 3 weeks ago

pan93412 commented 3 weeks ago

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 Provider:

Anything else we need to know?