Install Docker

Preparing Your Environment

  • You will need to install docker and docker-compose.

  • The following instructions assume Ubuntu 20.04 on an x86-64 CPU.

Install Docker

$ docker-compose --version

Test the installation:

$ sudo chmod +x /usr/local/bin/docker-compose

Apply executable permissions to the binary:

$ 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

Download the current stable release of Docker Compose:

Install Docker Compose

$ sudo docker run hello-world

Test the installation:

$ sudo apt-get update
$ sudo apt-get install docker-ce docker-ce-cli containerd.io

Install docker:

Setup the docker stable repository:

Add Docker’s official GPG key:

Update the apt package index and install packages to allow apt to use a repository over HTTPS:

Last updated

Was this helpful?