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)