Перейти к содержимому

Deploy NGINX in Docker on AWS EC2 | Complete Beginner Guide

SareyBoth

0:00 / 0:00

Deploy NGINX in Docker on AWS EC2 | Complete Beginner Guide

6 просмотров · 2 дня назад
SareyBoth
6 подписчиков
6 просмотров · 2 дня назад
Learn how to set up Docker on an AWS EC2 instance and deploy an NGINX web server container from start to finish. In this step-by-step tutorial, we cover configuring AWS security groups for HTTP port 80, installing and configuring the Docker engine, pulling the official NGINX image, and launching the container to serve live web traffic. Quick Commands Reference: 1. Update and install Docker (Amazon Linux 2023 / Ubuntu) For Amazon Linux 2023: sudo dnf update -y && sudo dnf install -y docker For Ubuntu: sudo apt update -y && sudo apt install -y docker.io 2. Start and enable Docker service sudo systemctl start docker sudo systemctl enable docker 3. Add current user to docker group (avoids sudo) sudo usermod -aG docker $USER newgrp docker 4. Pull and run the NGINX container docker pull nginx:latest docker run -d --name my-nginx -p 80:80 nginx:latest 5. Verify container status docker ps curl http://localhost