LoginSignup
1
0

More than 1 year has passed since last update.

docker build時のapt-get updateでGPG errorが出る場合の対処

Posted at

今までビルドがうまくいっていたDockerfileで久々にdocker buildを行なうとなぜかエラーが出る場合がありますよね。今回はapt get update でGPG Errorが出た場合の対処方法を解説します(と言っても一瞬で完了)

まずDockerfileは前半部分の例を一部切り取って下記に掲載します。

FROM nvidia/cuda:11.2.0-cudnn8-devel-ubuntu18.04
LABEL Hogehoge <hogehoge@hogehoge.com>
ENV API_ROOT /home
ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get clean
RUN apt-get update
RUN apt-get install -y  --fix-missing \
    build-essential \
    wget \
    bzip2 \
    git \
    gcc \
    g++ \
    cmake \
    pkg-config \
    checkinstall \
    libssl-dev \
    libreadline-gplv2-dev \

過去にビルドしたときはうまくいっていたのに今回はなぜかapt-get updateでこのようなエラーがでます。

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

このようなときはBase imageの最新版をpullしなおせばエラーが解決します。

$ docker pull nvidia/cuda:11.2.0-cudnn8-devel-ubuntu18.04

過去にdocker pullしていたBase imageの中に適切なpublic keyがないためこのようにして最新版のBase imageに更新する必要があります。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0