【Ubuntu docker运行dockerfile时报错】GPG error

docker在运行dockerfile中RUN apt-get update --fix-missing命令时报错

GPG error: https://developer.download.nvidia.cn/compute/cuda/repos/ubuntu2004/x86_64  InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A4B469963BF863CC
14.05 E: The repository 'https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64  InRelease' is not signed.

在这里插入图片描述提示缺少签名,打开dockerfile文件,在报错的命令上方,添加公钥代码(最后的一串为报错语句中所说的NO_PUBKEY)。如果在更新源的时候发生类似错误,将RUN换成sudo,其余不变即可

RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A4B469963BF863CC

你可能感兴趣的:(ubuntu,docker,linux)