Docker build fails during ‘apt-get install’ with 404 errors

While running ‘docker build’ for a new image using ubuntu:22.04 as the base, running apt-get install for certain packages is giving random 404s on some package dependencies. For example: #7 7.691 Err:1 http://ports.ubuntu.com/ubuntu-ports jammy-updates/main arm64 libpython3.10-minimal arm64 3.10.12-1~22.04.5#7 7.691 404 Not Found [IP: 185.125.190.36 80] If I run ubuntu:22.04 and then run the ‘apt-get install’ …

Running and connecting to different MySQL servers in Docker containers

Running and exposing default MySQL port: docker run -e MYSQL_ROOT_PASSWORD=mypassword -p 3306:3306 -d mysql mysql -u root -p Running with a different exposed port on the host: docker run -e MYSQL_ROOT_PASSWORD=mypassword -p 3307:3306 -d mysql Connecting to server on different port : -P option, but also requires -h for host, otherwise seems to connect to …

Updating local versions of Docker images if using the latest tag

I have an ubuntu:latest image pulled locally from a couple of years ago, and it’s obviously not the latest since it’s over 2 years old. ‘docker images’ shows: ubuntu latest d5ca7a445605 2 years ago 65.6MB If I run the image with -it and cat the /etc/lsb-release file, it shows it’s 20.04. Docker Hub is currently …