devcontainers / features

A collection of Dev Container Features managed by Dev Container spec maintainers. See https://github.com/devcontainers/feature-starter to publish your own
https://containers.dev/features
MIT License
881 stars 356 forks source link

`docker-in-docker` fails to install due to GPG error #476

Open sinedied opened 1 year ago

sinedied commented 1 year ago

This is what I get when trying to use Docker-in-Docker feature:

#0 0.162 ===========================================================================
#0 0.162 Feature       : Docker (Docker-in-Docker)
#0 0.162 Description   : Create child containers *inside* a container, independent from the host's docker instance. Installs Docker extension in the container along with needed CLIs.
#0 0.162 Id            : ghcr.io/devcontainers/features/docker-in-docker
#0 0.162 Version       : 1.0.9
#0 0.162 Documentation : https://github.com/devcontainers/features/tree/main/src/docker-in-docker
#0 0.162 Options       :
#0 0.162     VERSION="latest"
#0 0.162     MOBY="true"
#0 0.162     DOCKERDASHCOMPOSEVERSION="v1"
#0 0.162     AZUREDNSAUTODETECTION="true"
#0 0.162     DOCKERDEFAULTADDRESSPOOL=""
#0 0.162 ===========================================================================
#0 0.431 DOCKER_MOBY_ARCHIVE_VERSION_CODENAMES=buster bullseye bionic focal jammy
#0 0.431 Distro codename  'bullseye'  matched filter  'buster bullseye bionic focal jammy'
#0 0.442 find: '/var/lib/apt/lists/*': No such file or directory
#0 0.442 Running apt-get update...
#0 0.524 Get:1 http://deb.debian.org/debian bullseye InRelease [116 kB]
#0 0.552 Get:2 http://deb.debian.org/debian-security bullseye-security InRelease [48.4 kB]
#0 0.566 Get:3 http://deb.debian.org/debian bullseye-updates InRelease [44.1 kB]
#0 0.597 Err:1 http://deb.debian.org/debian bullseye InRelease
#0 0.597   At least one invalid signature was encountered.
#0 0.636 Err:2 http://deb.debian.org/debian-security bullseye-security InRelease
#0 0.636   At least one invalid signature was encountered.
#0 0.677 Err:3 http://deb.debian.org/debian bullseye-updates InRelease
#0 0.677   At least one invalid signature was encountered.
#0 0.681 Reading package lists...
#0 0.691 W: GPG error: http://deb.debian.org/debian bullseye InRelease: At least one invalid signature was encountered.
#0 0.691 E: The repository 'http://deb.debian.org/debian bullseye InRelease' is not signed.
#0 0.691 W: GPG error: http://deb.debian.org/debian-security bullseye-security InRelease: At least one invalid signature was encountered.
#0 0.691 E: The repository 'http://deb.debian.org/debian-security bullseye-security InRelease' is not signed.
#0 0.691 W: GPG error: http://deb.debian.org/debian bullseye-updates InRelease: At least one invalid signature was encountered.
#0 0.691 E: The repository 'http://deb.debian.org/debian bullseye-updates InRelease' is not signed.
#0 0.692 ERROR: Feature "Docker (Docker-in-Docker)" (ghcr.io/devcontainers/features/docker-in-docker) failed to install! Look at the documentation at https://github.com/devcontainers/features/tree/main/src/docker-in-docker for help troubleshooting this error.
------
samruddhikhandale commented 1 year ago

Hi 👋

@sinedied Can you provide your dev config so that I can try to reproduce the scenario? Especially, what's the image used by your dev container? It could have an expired GPG key which might cause this issue. I'd recommend deleting the cached image and retrying.

Tested the docker-in-docker Feature, looks good https://github.com/devcontainers/features/actions/runs/4357923213/jobs/7617831656

sinedied commented 1 year ago

Hi! I solved it by running docker image prune -f && docker container prune -f.

It's not first time I run into such an issue when using features (and I guess I'm not the only one), it might be interesting to either: