Cryptitan
Search…
Docker
Quick docker installation reference.
This is a quick reference to the docker installation steps to take, but you can always check the full installation guide on the official docker website.

Set up the repository

  • Update the apt package index and install packages to allow apt to use a repository over HTTPS:
    sudo apt-get update
    sudo apt-get install \
    ca-certificates \
    curl \
    gnupg \
    lsb-release
  • Add Docker’s official GPG key:
    curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
  • Use the following command to set up the stable repository
    echo \
    "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
    $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

Install Docker Engine

  • Update the apt package index, and install the latest version of Docker Engine and containerd:
    sudo apt-get update
    sudo apt-get install docker-ce docker-ce-cli containerd.io
  • Verify that Docker Engine is installed correctly by running the hello-world image.
    sudo docker run hello-world
  • Add User to Docker Group
    sudo usermod -aG docker $USER
    you can replace $USER with the name of the user account

Install Docker Compose

  • Run this command to download the current stable release of Docker Compose:
    sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
  • Apply executable permissions to the binary:
    sudo chmod +x /usr/local/bin/docker-compose
Copy link
On this page
Set up the repository
Install Docker Engine
Install Docker Compose