I’m trying to build custom docker image using FROM rayproject/ray:2.45.0-py310-gpu and it fails with below error when it runs command apt-get update due to missing correct key.
The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 871920D1991BC93C
I tried suggestions from internet to add this key but not able to get it working using gpg. this must be basic and must be faced by other too. can you please give me steps to solve same.
This error occurs because the public key required to verify a repository (often for Docker or CUDA) is missing in your image. The recommended solution is to fetch the missing GPG key and add it to your system’s keyring, using the modern approach (not apt-key, which is deprecated). For example, to add a key for Docker, you can use:
Then, update your sources list to reference the keyring with the signed-by option. This approach is shown in the official Ray Dockerfiles and PRs, and is the current best practice for resolving GPG key issues during apt-get update in Docker builds. See the detailed example in this Ray PR comment and Ray’s base.gpu.Dockerfile.
Would you like a step-by-step breakdown for your specific image and repository?