It’s been a long time since I’ve toyed with Docker in earnest. To be perfectly frank, possibly around the 5 year mark, maybe even longer. Even then, when I did experiment with Docker, I found the whole “thing” clunky, and less than ideal for my own purposes. Having many years experience testing, and experimenting with software technologies on Linux. I knew it wasn’t going to be a simple task to get everything working as I wanted. So, I watched a few videos on the subject, for motivation. Then I did the typical google search for “exact steps” . . .
I initially landed on this page which I found to be just regurgitated information from docs.docker.com. So, I wound up using docs.docker.com for my own exact steps, with one small modification. Adding docker-compose into the mix. After attempting to install docker-compose after the fact, initially. As it turns out, this was not such a big deal, as long as one uses common sense, while installing additional related packages at the proper time. e.g. When installing everything else related.
So, here are my own exact steps to recreate what I’ve done:
Starting off with some prereqs:
sudo apt update
sudo apt install apt-transport-https ca-certificates curl gnupg lsb-release -y
Followed by getting, and installing dockers APT keys:
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian \ $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
Next, before installing the various docker components we want, we need to update APT again, since we just added to the apt sources list. Here, I’ve deviated slightly from the docs.docker.com install method, by adding docker-compose.
sudo apt update sudo apt -y install docker-ce docker-ce-cli docker-compose containerd.io
Once everything is installed, we can check the docker version. As a simple installation test.
sudo docker version
If there is a need to check the status of the docker service. It can be done with the following command.
sudo systemctl status docker
Additionally, it may be prudent to download a simple docker image from docker hub, and running it to make sure everything is working correctly.
sudo docker run hello-world
It can be advantageous to add your normal user to the docker group. The following command will add <user name> to the docker user group. Where <user name> would be the normal user you’ve been using up until now.
sudo usermod -aG docker <user name>
That is it. It’s pretty straight forward, and simple. Next, I plan on using Docker to run my own local instance of WordPress. In preparation of writing my own WordPress theme.