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:
    1
    sudo apt-get update
    2
    3
    sudo apt-get install \
    4
    ca-certificates \
    5
    curl \
    6
    gnupg \
    7
    lsb-release
    Copied!
  • Add Docker’s official GPG key:
    1
    curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
    Copied!
  • Use the following command to set up the stable repository
    1
    echo \
    2
    "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
    3
    $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
    Copied!

Install Docker Engine

  • Update the apt package index, and install the latest version of Docker Engine and containerd:
    1
    sudo apt-get update
    2
    sudo apt-get install docker-ce docker-ce-cli containerd.io
    Copied!
  • Verify that Docker Engine is installed correctly by running the hello-world image.
    1
    sudo docker run hello-world
    Copied!
  • Add User to Docker Group
    1
    sudo usermod -aG docker $USER
    Copied!
    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:
    1
    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
    Copied!
  • Apply executable permissions to the binary:
    1
    sudo chmod +x /usr/local/bin/docker-compose
    Copied!