So first off what is Docker?
Docker is a set of platform as a service products that use OS-level virtualization to deliver software in packages called containers. (Source)
Using containers opens a new world to virtualization. Containers are lightweight and can spin up in microseconds comparing to virtual machines. As an example I ran a test to see how long it takes for a Ubuntu Server 20.04 VM to install and boot to its full working state. It took just under 20 mins on a Hard Drive. With the ubuntu container with the same functionality as the full vm it took 15 seconds to fully install bootup and be ready. Thats a crazy difference comparing to how long it takes on a VM. The next part of this blog is how to install docker. Check it out below.
Installing Docker is surprisingly easy and is done with a couple of commands:
Update Your Linux Distro Packages
sudo apt-get update && sudo apt-get upgrade -y
sudo apt-get install docker.io -y
Done! Docker is now installed. You can check using the command below:
sudo docker --version
Next we are going to install portainer which is an open source lightweight management web UI for docker.
First we need to create a volume that portainer is going to install its data into. We can do this with the command below:
sudo docker volume create portainer_data
Then we can deploy the portainer instance using one command:
sudo docker run -d -p 8000:8000 -p 9443:9443 --name portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:latest
Finally open up a web browser and type in your docker server ip address to connect to the Portainer web ui using the port 9443 like the example below: