I have two bare-metal machines each running Ubuntu LTS 18.04 and docker --version
reports 20.10.7 on both.
On each, I've pulled the latest image for ubuntu:22.04. Both report, verbatim:
$ docker pull ubuntu:22.04
22.04: Pulling from library/ubuntu
Digest: sha256:26c68657ccce2cb0a31b330cb0be2b5e108d467f641c62e13ab40cbec258c68d
Status: Image is up to date for ubuntu:22.04
docker.io/library/ubuntu:22.04
$ docker images | grep 'ubuntu\s*22.04'
ubuntu 22.04 d2e4e1f51132 2 weeks ago 77.8MB
However: While on the one host machine, an apt update
within the container works fine - on the other host we'll get an error-out with return code 100:
$ docker run -it ubuntu:22.04
root@81ddacc04c9f:/# apt update
Get:1 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB]
Get:2 http://archive.ubuntu.com/ubuntu jammy InRelease [270 kB]
Get:3 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages [84.2 kB]
Get:4 http://archive.ubuntu.com/ubuntu jammy-updates InRelease [109 kB]
Get:5 http://security.ubuntu.com/ubuntu jammy-security/restricted amd64 Packages [61.3 kB]
Get:6 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 Packages [61.0 kB]
Get:7 http://archive.ubuntu.com/ubuntu jammy-backports InRelease [90.7 kB]
Get:8 http://archive.ubuntu.com/ubuntu jammy/universe amd64 Packages [17.5 MB]
Get:9 http://archive.ubuntu.com/ubuntu jammy/restricted amd64 Packages [164 kB]
Get:10 http://archive.ubuntu.com/ubuntu jammy/main amd64 Packages [1792 kB]
Get:11 http://archive.ubuntu.com/ubuntu jammy/multiverse amd64 Packages [266 kB]
Get:12 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages [157 kB]
Get:13 http://archive.ubuntu.com/ubuntu jammy-updates/restricted amd64 Packages [68.6 kB]
Get:14 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages [97.6 kB]
Fetched 20.8 MB in 13s (1641 kB/s)
Reading package lists... Done
E: Problem executing scripts APT::Update::Post-Invoke 'rm -f /var/cache/apt/archives/*.deb /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin || true'
E: Sub-process returned an error code
root@81ddacc04c9f:/# echo $?
100
Any subsequent attempts to install packages in that container will therefore fail.
Older ubuntu docker images, eg. ubuntu:18.04
and ubuntu:20.04
, are not affected.
apt update
inside a Container? That shouldn't really be necessary - the base image should be updated regularly.