Docker Install For Me

Docker Install For Me

While you can find articles and vast amounts of tutorials on how to install Docker. This is another one of those for my own purpose, if you find it helps you that's great and have yourself a good day. Most things here will be straight lifted from Docker's guide to install Docker on Ubuntu > Here


Let's start basically copy pasting the commands into terminal on Ubuntu 22.04.

 sudo apt-get update

 sudo apt-get install \
    ca-certificates \
    curl \
    gnupg
This gets us to use Docker's repository over HTTPS with the "apt" command
sudo install -m 0755 -d /etc/apt/keyrings

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg

sudo chmod a+r /etc/apt/keyrings/docker.gpg
Adding Docker’s official GPG key
echo \
  "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
  "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
Setting up the Docker repository
sudo apt-get update
Updating the apt-get package index since we added Docker in

The next command installs the Docker on to your machine.

sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
To install the latest version

Now verify that Docker installed correctly.

sudo docker run hello-world
Hello world docker container test, it print out hello world as confirmation it was installed correctly.

Now let's make sure that Docker starts with the system after reboot.

sudo systemctl enable docker.service

sudo systemctl enable containerd.service
If you want to stop this behaviour use "disable" where "enable" is.

With that out of the way you should now have Docker installed and ready for containerizations.

First day of rain of Spring 2023 Edmonton.

If any of this helped I'm glad.