Docker on Debian DVD Install

This will be a quick one on how to install docker on Debian 12.

What you will need: A machine with Debian installed (Virtual, or physical) an internet connection

In this example, I am using a physical machine. I would like to try deploying docker within a VM to spec it's performance but that is for another time.

I have a laptop I am putting this on, and connecting via SSH to execute the commands. I installed Debian with only the SSH server and standard system utilities features, with the DVD installer ISO file. I noticed some hiccups.

To connect to the machine, you will need it's IP address, you can find this by running ip addr ssh username@ipaddress where the username is the account you login to your debian instance with, and the ipaddress is the ip you captured when you ran ip addr

The first thing you will need to do is escalate to root to download and install packages, this can be done with the command su

I didn't have any luck installing the packages with apt or apt-get so I made a new directory with mkdir and downloaded the files with wget after cding into that directory. wget https://download.docker.com/linux/debian/dists/bookworm/pool/stable/amd64/containerd.io_1.7.20-1_amd64.deb https://download.docker.com/linux/debian/dists/bookworm/pool/stable/amd64/docker-ce_27.1.2-1~debian.12~bookworm_amd64.deb https://download.docker.com/linux/debian/dists/bookworm/pool/stable/amd64/docker-ce-cli_27.1.2-1~debian.12~bookworm_amd64.deb https://download.docker.com/linux/debian/dists/bookworm/pool/stable/amd64/docker-buildx-plugin_0.16.2-1~debian.12~bookworm_amd64.deb https://download.docker.com/linux/debian/dists/bookworm/pool/stable/amd64/docker-compose-plugin_2.29.1-1~debian.12~bookworm_amd64.deb

After this is finished, you can try to install with dpkg -i ./containerd.io1.7.20-1amd64.deb \ ./docker-ce27.1.2-1~debian.12~bookwormamd64.deb \ ./docker-ce-cli27.1.2-1~debian.12~bookwormamd64.deb \ ./docker-buildx-plugin0.16.2-1~debian.12~bookwormamd64.deb \ ./docker-compose-plugin2.29.1-1~debian.12~bookwormamd64.deb

However, I got an error about 'ldconfig' and 'start-stop-daemon' not found in my path so I needed to update my PATH variable with export PATH=$PATH:/usr/local/sbin:/usr/sbin:/sbin

If you also used the DVD iso installer, it will have the DVD in your sources.list. You can open this file and comment out a line. First open the file with nano nano /etc/apt/sources.list Then on the first line I found what needed commented out change deb cdrom:[Debian GNU/Linux 12.6.0 Bookworm – Official amd64 DVD Binary-1 with firmware 20240629-10:19]/ bookworm main

to

# deb cdrom:[Debian GNU/Linux 12.6.0 Bookworm – Official amd64 DVD Binary-1 with firmware 20240629-10:19]/ bookworm main

Add a hashtag before the line to comment it out, then save with ctrl-x.

Then run apt-get update and apt-get install -f

This will install any missing dependencies and you should be good to install docker now with dpkg -i ./containerd.io1.7.20-1amd64.deb \ ./docker-ce27.1.2-1~debian.12~bookwormamd64.deb \ ./docker-ce-cli27.1.2-1~debian.12~bookwormamd64.deb \ ./docker-buildx-plugin0.16.2-1~debian.12~bookwormamd64.deb \ ./docker-compose-plugin2.29.1-1~debian.12~bookwormamd64.deb

You should see no error messages and can then run service docker start and then a test docker run hello-world

You should see a Hello from Docker! message.

For more information on deploying docker images, please see the Docker website documentation.