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 • Edited on

1

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! 🚀

Image of Datadog

Create and maintain end-to-end frontend tests

Learn best practices on creating frontend tests, testing on-premise apps, integrating tests into your CI/CD pipeline, and using Datadog’s testing tunnel.

Download The Guide

Top comments (0)

Create a simple OTP system with AWS Serverless cover image

Create a simple OTP system with AWS Serverless

Implement a One Time Password (OTP) system with AWS Serverless services including Lambda, API Gateway, DynamoDB, Simple Email Service (SES), and Amplify Web Hosting using VueJS for the frontend.

Read full post

👋 Kindness is contagious

Engage with a wealth of insights in this thoughtful article, valued within the supportive DEV Community. Coders of every background are welcome to join in and add to our collective wisdom.

A sincere "thank you" often brightens someone’s day. Share your gratitude in the comments below!

On DEV, the act of sharing knowledge eases our journey and fortifies our community ties. Found value in this? A quick thank you to the author can make a significant impact.

Okay