I can’t speak to this specific problem, but in my day job I do a lot
of development in Docker containers, and it’s pretty common
in container base images to delete the database files for apt in
/var/lib. The update command restores them.
Seems like the base image was updated and in fact had /var/lib
cleaned. It’s good to do an explicit apt update when building in
containers. It’s also good to include
export DEBIAN_FRONTEND=noninteractive
to all your scripts that call apt or apt-get. Otherwise your builds can
fail if a package requires configuration at install time.