How to Set-up and Configure Docker On AWS cloud

Rahul Kumar
3 min readJun 24, 2022

--

prerequisite :

  • an EC2 instance (Linux).

What is docker?

  • Docker is open source and written in Google’s Go language. It is based on containerization (OS-level virtualization), where the physical server and operating system are virtualized to produce multiple instances.

Step 1. Launch a Linux instance on AWS:

You can refer this blog for Launching EC2 instance.

I have already launched a Linux Ec2 instance on AWS.

Step 2. Connect to the EC2 instance and install Docker:

I have connected Ec2 instance with Putty.

  • Then run this command to update the yum package :

$ sudo yum update -y

  • Installing docker by running this command:

$ sudo yum install docker -y

Step 3. Configure Docker :

For non-root users in Linux, you might need to proceed with below steps to avoid permission issues.

  • Create the docker group using following command

$ sudo groupadd docker

  • Add user to the docker group using following command:

$ sudo usermod -aG docker $USER

Log out and log in again so that the changes get reflected.

Step 4. Start Docker service :

  • Start docker service using following command:

$ sudo systemctl start docker

  • To check docker service status (running or not) using following command:

$ sudo systemctl status docker

Thanks for Reading…..

--

--

Rahul Kumar
Rahul Kumar

Written by Rahul Kumar

MERN Stack Developer building scalable web apps with MongoDB, Express.js, React.js, Node and TS. Sharing insights and best practices for modern web development.

No responses yet