Day 1 ! Exploring Docker on AWS EC2 Instance

Day 1 ! Exploring Docker on AWS EC2 Instance

ยท

2 min read

Hi everyone! Today I want to share my journey of exploring Docker on an AWS EC2 instance. Docker is an incredible tool for containerization, and I've learned quite a bit about its basic commands and concepts. Here's a brief rundown of what I've learned:

Installation:

I started by installing Docker on my AWS EC2 instance. Docker allows me to run and manage containers effortlessly.

Starting and Stopping Docker Service:

I learned how to start and stop the Docker service using commands like:
To start: sudo systemctl start docker
To stop: sudo systemctl stop docker

Checking Docker Service Status:

Monitoring the status of the Docker service is easy with the command:
sudo systemctl status docker

Searching and Pulling Images:

I explored Docker Hub, a repository of Docker images, and practiced:
Searching: docker search <image_name>
Pulling: docker pull <image_name>

Running Containers:

Running containers is a breeze with:
docker run -d --name <container_name> <image_name>

Stopping and Removing Containers:

I learned to stop and remove containers using:
To stop: docker stop <container_name>
To remove: docker rm <container_name>

Entering Containers:

Exploring the inside of containers is intriguing:
docker attach container_name

Managing Running and Stopped Containers:

I found out the number of running and stopped containers:
Running: docker ps
All containers: docker ps -a

Deleting Containers and Images:

To clean up, I used:
To delete a container: docker rm <container_name>
To delete an image: docker rmi <image_name>
I'm excited about this hands-on experience with Docker. If you're curious about Docker too, give it a try and explore its fantastic capabilities!
Feel free to ask if you have any questions or want to discuss Docker further. Let's dive into the world of containerization together! ๐Ÿš€๐Ÿณ

Did you find this article valuable?

Support Aqib Hafeez(DevOps enthusiast) by becoming a sponsor. Any amount is appreciated!

ย