base images need an apt-get update
The base debian images produced do not have a functioning apt, requiring you to run apt-get update
before doing any apt operations. This is fairly minor, but it means that all downstream container builds must include an apt-get update
step before installing any packages, which is a bit redundant and could just be done here:
podman run -it containers.torproject.org/tpo/tpa/base-images:bookworm@sha256:5d09cdc15df1d1415835a3d26b7ffd329d23afb8ed58b4ae3f6cba6c88316840 /bin/sh
# apt-get install cowsay
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package cowsay
# apt-get update
Get:1 http://security.debian.org/debian-security bookworm-security InRelease [48.0 kB]
Get:2 http://deb.debian.org/debian bookworm InRelease [151 kB]
Get:3 http://deb.debian.org/debian bookworm-updates InRelease [55.4 kB]
Get:4 http://security.debian.org/debian-security bookworm-security/main amd64 Packages [186 kB]
Get:5 http://deb.debian.org/debian bookworm/main amd64 Packages [8787 kB]
Get:6 http://deb.debian.org/debian bookworm-updates/main amd64 Packages [2468 B]
Fetched 9230 kB in 2s (6055 kB/s)
Reading package lists... Done
# apt-get install cowsay
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
libtext-charwidth-perl
Suggested packages:
filters cowsay-off
The following NEW packages will be installed:
cowsay libtext-charwidth-perl
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 30.9 kB of archives.
After this operation, 136 kB of additional disk space will be used.
Do you want to continue? [Y/n]