Docker

This page assumes that you are running Ubuntu Server on your bare metal machine. Specific versions may apply so you will need to read through the Docker documentation and follow along there if anything that is written here is out of date.
Alright, when starting out in HLing there are a few options for deploying software. You can run software right on your bare metal or you can run it in a virtual machine (VM). I'm sure there are other ways but theses are the most common. Docker is a form of virtualization. It's a software that you install on your bare metal and from there Docker creates "containers" that are VMs of whatever you want. It's a fast way to deploy a software without knowing anything about Linux.
Check out the official website and documentation (link specific to my build) here for lot more information that I'm not going to go over.
Installing Docker on Ubuntu Server
First, per the documentation Docker wants us to verify some firewall settings because of the way the containers communicate to the bare metal for networking. Ubuntu Server comes with Uncomplicated Firewall (UFW) built in. It looks like UFW doesn't conflict with Docker so we can skip over this unless things change later.
Second, we will install using the apt repository built into Ubuntu Server.
# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
# Add the repository to Apt sources:
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
curl
is pre-installed on most modern Ubuntu Server installations, but this isn't guaranteed for all versions or configurations. To check if curl
is installed, open the terminal and type curl --version
. If it's not installed, you can easily install it by running sudo apt update && sudo apt install curl
Then we need to install the latest version of Docker
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
The Docker service starts automatically after installation. To verify that Docker is running, use:
sudo systemctl status docker
Some systems may have this behavior disabled and will require a manual start:
sudo systemctl start docker
Verify that the installation is successful by running the hello-world
image:
sudo docker run hello-world
Congratulations, you now have Docker installed on your system. Using docker is pretty self explanatory. You can use docker -help
command to pull up all of the commands you can use.