Lab Information
A container named kke-container was created by one of the Nautilus project developers on App Server 3. It was solely for testing purposes and now requires deletion. Execute the following task:
Delete the kke-container on App Server 3 in Stratos DC.
Lab Solutions
β
Part 1: Exact KodeKloud Lab Guidelines (Exam-Safe Mode)
π Step 0: Login to Application Server 3
From the jump host:
ssh banner@stapp03
Password:
BigGr33n
ποΈ Step 1: Stop the container
docker ps
docker stop kke-container
β Step 2: Delete the container
docker rm kke-container
π Step 3: Verification (MANDATORY)
docker ps -a
Expected result
kke-container is not listed
β οΈ Common Lab Mistakes to Avoid
β Deleting container on wrong server
β Removing image instead of container
β Forgetting to stop a running container before removal
β Using incorrect container name
π§ Part 2: Simple Step-by-Step Explanation
πͺ Whatβs happening?
Containers cannot be removed while running
We stop it first to avoid errors.
Removing deletes container metadata
The image remains untouched (this is expected).
π Command Breakdown
docker stop kke-container
Gracefully stops the container
docker rm kke-container
Permanently removes the container
π§ Exam Memory Hook
Stop β Remove β Verify
Always confirm with:
docker ps -a
Top comments (0)