Docker EXEC Operations

Pubblicato il: 17 aprile 2026
sul canale di: Otter Tech
13
1

🐳 Docker EXEC Operations | Docker Level-2 Series | Lab 4

Welcome to Lab 4 of the Docker Level-2 Series! In this hands-on lab, you’ll learn how to execute commands inside a running container and configure services—an essential skill for real-world container management.

A Nautilus DevOps team member started configuring services inside a running container but had to step away. Your task is to step in, complete the setup, and ensure everything is running properly inside the container.

📌 Lab Objective:
Use Docker exec to configure and manage services داخل a running container.

🛠️ Task Requirements:

Container Name: kkloud
Server: App Server 2
Install apache2 inside the container
Configure Apache to run on port 8087
Ensure Apache service is running
Keep the container in running state

💻 Step-by-Step Commands:

Connect to App Server 2
ssh steve@stapp02
Access the running container
sudo docker exec -it kkloud bash
Update package index and install apache2
apt update
apt install -y apache2
Change Apache port from 80 to 8087
sed -i 's/80/8087/g' /etc/apache2/ports.conf
Update default virtual host config
sed -i 's/:80/:8087/g' /etc/apache2/sites-available/000-default.conf
Start Apache service
service apache2 start
Verify Apache is running
service apache2 status
Exit container
exit
Ensure container is still running
sudo docker ps

✅ Expected Outcome:

Apache installed inside container
Running on port 8087
Service is active and running
Container remains up and running

🌟 Why This Lab Matters:
Being able to access and configure running containers is crucial for debugging, quick fixes, and real-time updates in production environments. This skill is widely used in DevOps and container-based deployments.

🎯 Series: Docker Level-2
Master Docker with real-world labs covering containers, images, networking, and advanced operations.

🔔 Don’t forget to like, share, and subscribe for more tutorials from OtterTech!

#Docker #DevOps #Containers #Apache #DockerExec #Containerization #OpenSource #Nautilus #StratosDatacenter #DockerLevel2 #100DaysOfDevOps #OtterTech #Lab4


In questa pagina del sito puoi guardare il video online Docker EXEC Operations della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Otter Tech 17 aprile 2026, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 13 volte e gli è piaciuto 1 spettatori. Buona visione!