docker, aws,

How to Install Docker on Amazon Linux 2

Apr 10, 2023 · 1 min read · Post a comment

The installation of Docker on Amazon Linux 2 consists of several simple steps, which will be listed below.


  • Amazon Linux 2
  • sudo privileges

Install Docker on Amazon Linux 2

Step 1. Update the package manager:

sudo yum update -y

Step 2. Install Docker.

sudo amazon-linux-extras install docker

Step 3. Start the Docker Service.

sudo systemctl start docker

Step 4 (Optional). Enable Docker to start on boot.

sudo systemctl enable docker

Step 5. Verify that Docker is running.

sudo docker info

Step 6. You may need to add your user to the docker group in order to run Docker commands without using sudo. To do this, run the following command:

sudo usermod -aG docker <username>

Replace <username> with your username.


Feel free to leave a comment below and if you find this tutorial useful, follow our official channel on Telegram.