DEV Community

Cover image for 2.Deploy Nginx Container on Application Server
Thu Kha Kyawe
Thu Kha Kyawe

Posted on

2.Deploy Nginx Container on Application Server

Lab Information

The Nautilus DevOps team is conducting application deployment tests on selected application servers. They require a nginx container deployment on Application Server 1. Complete the task with the following instructions:

On Application Server 1 create a container named nginx_1 using the nginx image with the alpine tag. Ensure container is in a running state.
Enter fullscreen mode Exit fullscreen mode

Lab Solutions

βœ… Part 1: Exact KodeKloud Lab Guidelines (Exam-Safe Mode)
πŸ”‘ Step 0: Login to Application Server 1

From the jump host:

ssh tony@stapp01
# Password:
Ir0nM@n
Enter fullscreen mode Exit fullscreen mode

πŸ“¦ Step 1: Run nginx container (alpine tag)

docker run -d --name nginx_1 nginx:alpine
Enter fullscreen mode Exit fullscreen mode

πŸ” Step 2: Verify container state (MANDATORY)

docker ps
Enter fullscreen mode Exit fullscreen mode

🧠 Part 2: Simple Step-by-Step Explanation (Beginner Friendly)
πŸͺœ What are we doing?

We are:

Logging into Application Server 1

Creating a container

Making sure it keeps running

πŸ” Command Breakdown
docker run -d --name nginx_1 nginx:alpine

docker run β†’ create + start a container

-d β†’ detached mode (runs in background)

--name nginx_1 β†’ exact container name required by lab

nginx:alpine β†’ nginx image, lightweight alpine version

If -d is missing β†’ container may stop β†’ lab fails.

🧠 Exam Memory Hook

Right server β†’ Right name β†’ Right image β†’ Running

Always verify with:

docker ps


Resources & Next Steps
πŸ“¦ Full Code Repository: KodeKloud Learning Labs
πŸ“– More Deep Dives: Whispering Cloud Insights - Read other technical articles
πŸ’¬ Join Discussion: DEV Community - Share your thoughts and questions
πŸ’Ό Let's Connect: LinkedIn - I'd love to connect with you

Credits
β€’ All labs are from: KodeKloud
β€’ I sincerely appreciate your provision of these valuable resources.

Top comments (0)