GPG error in Ubuntu 21.04 after second apt-get update during Docker build

Tanmaya picture Tanmaya · Feb 22, 2021 · Viewed 15.4k times · Source

Getting error while building the following Docker file

FROM ubuntu:21.04

RUN apt-get update && \
    apt-get install --no-install-recommends -y curl=7.\* && \
    apt-get install --no-install-recommends -y unzip=6.\* &&\ 
    rm -rf /var/lib/apt/lists/*

RUN apt-get update && \
    mkdir -p /usr/share/man/man1 && \
    apt-get install --no-install-recommends -y maven=3.6.3-5 && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/*

The error occurs when the second apt-get update runs.

The error is as follows :-

E: The repository 'http://security.ubuntu.com/ubuntu hirsute-security InRelease' is not signed.
W: GPG error: http://archive.ubuntu.com/ubuntu hirsute InRelease: gpgv, gpgv2 or gpgv1 required for verification, but neither seems installed
E: The repository 'http://archive.ubuntu.com/ubuntu hirsute InRelease' is not signed.
W: GPG error: http://archive.ubuntu.com/ubuntu hirsute-updates InRelease: gpgv, gpgv2 or gpgv1 required for verification, but neither seems installed
E: The repository 'http://archive.ubuntu.com/ubuntu hirsute-updates InRelease' is not signed.
W: GPG error: http://archive.ubuntu.com/ubuntu hirsute-backports InRelease: gpgv, gpgv2 or gpgv1 required for verification, but neither seems installed
E: The repository 'http://archive.ubuntu.com/ubuntu hirsute-backports InRelease' is not signed.

Any kind of help would be appreciated.

Answer

Gregor Jasny picture Gregor Jasny · Feb 26, 2021

That's a bug in the docker / seccomp / glibc interaction: https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1916485