Docker Environment Setup on Local and AWS EC2

First, go to the official Docker website and create an account.
After creating your account, download Docker Desktop.
Look for System type
If it says x64-based processor, then download the amd64 version.
☁️ How to Set Up Docker on AWS EC2
✅ Step 2: Open AWS and Create an Account
Visit the AWS Console and create a free-tier account.
👉 Link: AWS Console EC2 Region EU-North-1
🛠️ Step 3: Launch an EC2 Instance
Now go to the EC2 dashboard and start the process to launch a new instance.
Give your instance a name (e.g.,
docker-server)Choose the Ubuntu OS (this is great for free-tier and Docker support)

🆓 Step 4: Select Instance Type
Choose t3.micro – it's available under the AWS free tier and perfect for practice.

🔑 Step 5: Create a Key Pair
You'll need to create a key pair (a .pem file) which contains your public and private key for SSH access.
Download and keep it safe – you’ll need it for connecting to your server.

💾 Step 6: Configure Storage
Set the storage size to 8 GB. This ensures your system won’t hang and Docker will run smoothly.

🚀 Step 7: Launch and Connect to the Instance
Click Launch Instance. After it’s launched, go to your EC2 dashboard and click Connect.
🔗 Step 8: Connect via SSH
You can now connect to your server using SSH. If you’re not familiar with this, follow the detailed SSH connection steps from this blog:
👉 (Insert your blog link here)
(ss)
🐳 Docker Installation on AWS EC2 (Ubuntu)
Now that you're connected to your instance via SSH, let’s install Docker.
🔄 Step 9: Update the Package List
Before installing Docker, update your package list to ensure all security patches are applied.
plaintextCopyEditsudo apt-get update

📦 Step 10: Install Docker
Now, install Docker using the following command:
plaintextCopyEditsudo apt-get install docker.io

✅ Step 11: Check Docker Status
Verify if Docker is running properly:
plaintextCopyEditsudo systemctl status docker
This command will also help you understand the Docker architecture and whether the service is active.

📋 Step 12: Check Docker Containers
To check running containers:
plaintextCopyEditdocker ps

Note: If you see a message saying that the current user is not part of the Docker group, you need to add yourself manually.
To add your user to the Docker group:
plaintextCopyEditsudo usermod -aG docker $USER
To apply the group change without logging out and back in:
plaintextCopyEditnewgrp docker




