Skip to content

Instantly share code, notes, and snippets.

@phish108
Last active June 5, 2024 07:42
Show Gist options
  • Save phish108/4df62978a8503c5f9434c71091f2809a to your computer and use it in GitHub Desktop.
Save phish108/4df62978a8503c5f9434c71091f2809a to your computer and use it in GitHub Desktop.
Update ubuntu with docker

Updating to ubuntu 24.04 with docker installed

Ubuntu 24.04 uses a new apt repo metadata-format. This caused some headaches. The following steps solved the problem.

Notes when updating Ubuntu 23.10 to 24.04 with docker installed.

  1. sudo apt update
  2. sudo apt upgrade -y
  3. sudo do-release-upgrade

If something goes wrong then run sudo screen -list.

Pick the release upgrade window and run sudo screen -d -r root/1567.ubuntu-release-upgrade-screen-window and continue where you left off.

  1. reboot.
  2. Check that /etc/apt/sources.list.d/ contains docker_com.list.sources
  3. Check that /etc/apt/trusted.gpg.d/ contains docker.gpg
  4. Change /etc/apt/sources.list.d/docker_com.list.sources to the following content:
Enabled: yes
Types: deb
URIs: https://download.docker.com/linux/ubuntu
Suites: noble
Components: stable
Signed-by: /etc/apt/trusted.gpg.d/docker.gpg

Important lines:

Line 1: Enabled: yes the default is no.

Line 4: Suites: noble the orginal value is mantic.

Line 6: Signed-by: /etc/apt/trusted.gpg.d/docker.gpg this line does not exist by default. This line is important because if missing apt will complain that signature based verification is not possible.

  1. sudo apt update
  2. sudo apt upgrade -y
  3. sudo apt clean
  4. sudo apt autoremove
  5. sudo reboot

Done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment