HOWTO: How to setup Docker
A white dry erase board with red marker, with the words How To illustrating the instructions for completing a task

HOWTO: How to setup Docker

Installing prerequisites:

sudo apt-get install \
  ca-certificates \
  curl \
  gnupg \
  lsb-release -y

Adding Docker’s official GPG key:

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

Setting up official Docker repository:

echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] \ https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

Installing Docker Engine:

sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y

Verifying the installation:

docker --version
sudo docker run hello-world

After the hello-world container the next container to get going is Portainer to get a GUI to manage the Docker Engine.

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *