The repository ... is not signed error in docker build apt-get update

Every time I encountered it, I forgot the cause and wasted my time, so make a note of it so that I can remember it.

Event

When I try to build an Ubuntu 20.04 image with Docker for Mac and do the usual ʻapt-get updatein the Dockerfile, the followingThe repository ... is not signed.` error may occur. There is.

Get:1 http://security.ubuntu.com/ubuntu focal-security InRelease [107 kB]
Get:2 http://archive.ubuntu.com/ubuntu focal InRelease [265 kB]
Err:1 http://security.ubuntu.com/ubuntu focal-security InRelease
  At least one invalid signature was encountered.
Err:2 http://archive.ubuntu.com/ubuntu focal InRelease
  At least one invalid signature was encountered.
Get:3 http://archive.ubuntu.com/ubuntu focal-updates InRelease [111 kB]
Err:3 http://archive.ubuntu.com/ubuntu focal-updates InRelease
  At least one invalid signature was encountered.
Get:4 http://archive.ubuntu.com/ubuntu focal-backports InRelease [98.3 kB]
Err:4 http://archive.ubuntu.com/ubuntu focal-backports InRelease
  At least one invalid signature was encountered.
Reading package lists...
W: GPG error: http://security.ubuntu.com/ubuntu focal-security InRelease: At least one invalid signature was encountered.
E: The repository 'http://security.ubuntu.com/ubuntu focal-security InRelease' is not signed.
W: GPG error: http://archive.ubuntu.com/ubuntu focal InRelease: At least one invalid signature was encountered.
E: The repository 'http://archive.ubuntu.com/ubuntu focal InRelease' is not signed.
W: GPG error: http://archive.ubuntu.com/ubuntu focal-updates InRelease: At least one invalid signature was encountered.
E: The repository 'http://archive.ubuntu.com/ubuntu focal-updates InRelease' is not signed.
W: GPG error: http://archive.ubuntu.com/ubuntu focal-backports InRelease: At least one invalid signature was encountered.
E: The repository 'http://archive.ubuntu.com/ubuntu focal-backports InRelease' is not signed.

I look at the message and think "Is it a signature problem?", But every time I waste time saying "No, I know if the Ubuntu version is earlier, but the image tag is the latest and it's strange to wake up ..." Was ...

Cause

The conclusion of my case was that ** the root partition usage was 100% of the Docker disk image size **.

Every time I notice it, I feel weak ...

root@c761181b1d64:/# df -h
Filesystem      Size  Used Avail Use% Mounted on
overlay          30G   28G     0 100% /
...

This can be avoided by increasing the Disk image size of Docker for Mac, but it was a machine that could not afford to increase it ...

I avoided it safely by freeing up space with docker image prune which deletes all unused images and docker container prune which deletes all stopped containers.

As long as you continue to use a machine that does not have enough disk space, you will see an error again. The next time I encounter it, I'll solve it smoothly ...

Reference link

Repository is not signed in docker build | stack overflow

Recommended Posts

The repository ... is not signed error in docker build apt-get update
[Error] The app is not displayed in the production environment
Error in production environment (The asset "~" is not present in the asset pipeline.)
"" Application.js "is not present in the asset pipeline" error in Ruby on Rails
[Rails] About the error that the image is not displayed in the production environment
The case that "apt-get update" defined in "Dockerfile" could not be done at the time of "docker-compose build"
The devise error message is not displayed properly.
When the project is not displayed in eclipse
Ebean.update () is not executed in the inherited model.
When rewriting the CMD of docker image of Pod in the manifest of k8s, command is not good
Fixed NVIDIA Docker related signature invalid error in apt update
The idea of cutting off when the error is not resolved
Docker does not work when DOCKER_HOST is specified in WSL2
[Docker] The story that an error occurred in docker-compose up
npm error in docker tutorial
Build a browser test environment using Capybara in the Docker development environment
Build error for The file ca n’t be saved in Xcode
The story that the build error did not stop when using Eclipse 2020
Hit the Docker API in Rust
Error in ./gradlew: Symbol not found
Data is not registered in Rails.
What to do if the prefix c is not bound in JSP
[Docker] How to solve the error function not implemented @ io_fread ~ [Super easy]
catch (Exception e) or catch (IOException e) is not required in the try-with-resources syntax
Error when the member of Entity class used in SpringWebFlux is final
[Docker] How to build when the source code is bind-mounted on the container
[Cloud9] Yay! You ’re on Rails! Is not displayed in the rails tutorial
[Error] Error during Docker build (solved by pulling the latest version of image)
[Beginner] What is Docker in the first place? Easy-to-understand explanation from the basics!
If you get the error The data ca n’t be read because it is missing in docker for mac
If the JDK version is correct in Eclipse but an error occurs or the compiler does not work properly
How to resolve the error'ActionView :: Template :: Error (The asset "application.css" is not present in the asset pipeline.'" When precompiling Rails assets