DEV Community

Cover image for DevOps with Guruu | Chapter 3: Install and Use Docker with EC2 | Build Your First CI/CD Pipeline
Hoang Guruu for AWS Community Builders

Posted on • Updated on

DevOps with Guruu | Chapter 3: Install and Use Docker with EC2 | Build Your First CI/CD Pipeline

Image description

Get more detail with Youtube

DevOps with Guruu | Chapter 3: Install and Use Docker with EC2 | Build Your First CI/CD Pipeline

Welcome back to the third chapter of our DevOps with Guruu series! In this segment, we'll focus on two crucial components: Docker and EC2, along with building your very first CI/CD pipeline. Let's dive in:

  • Setup EC2 Instance:

Launch an EC2 instance on AWS with your desired specifications.
Connect to your instance using SSH for further configurations.

  • Install Docker on EC2 Instance:

Update the package index.
Install necessary packages to allow APT to use a repository over HTTPS.
Add the Docker GPG key.
Add the Docker repository to APT sources.
Update the package database.
Install Docker.
Verify Docker installation.

  • Docker Run Image Nginx:

Pull the Nginx image from Docker Hub.
Run the Nginx container, mapping port 80 of the container to port 80 of the host.

  • Docker Run Image Jenkins:

Pull the Jenkins image from Docker Hub.
Run the Jenkins container, mapping ports 8080 and 50000 to the host.

  • Docker Build Your Image:

Navigate to your project directory containing your Dockerfile.
Build your Docker image.

  • Docker Run Your Image and Push Image:

Run your Docker image.
Tag your image with the repository URL.
Push your image to the repository.
By following these steps, you'll have Docker installed and running on your EC2 instance, along with deploying Nginx and Jenkins containers. Additionally, you'll have built your custom Docker image and pushed it to a repository.

Join us on this journey to mastering DevOps! These tutorials lay a solid foundation for your DevOps skills. Don't forget to like, share, and subscribe for more insightful content. Happy learning, aspiring DevOps engineers! 🌟

Stay tuned for the upcoming chapters, where we'll delve into more advanced DevOps concepts. Until then, keep exploring and experimenting! Cheers! 🚀

Top comments (0)