Lab Information
The Nautilus DevOps team possesses confidential data on App Server 2 in the Stratos Datacenter. A container named ubuntu_latest is running on the same server.
Copy an encrypted file /tmp/nautilus.txt.gpg from the docker host to the ubuntu_latest container located at /usr/src/. Ensure the file is not modified during this operation.
Lab Solutions
β
Part 1: Exact KodeKloud Lab Guidelines (Exam-Safe Mode)
π Step 0: Login to Application Server 2
From the jump host:
ssh steve@stapp02
Password:
Am3ric@
π Step 1: Copy the file into the container
docker cp /tmp/nautilus.txt.gpg ubuntu_latest:/usr/src/
π Step 2: Verify inside the container (MANDATORY)
docker exec ubuntu_latest ls -l /usr/src/
Expected result
File nautilus.txt.gpg is present in /usr/src/
File name and size match (no modification)
β οΈ Common Lab Mistakes to Avoid
β Copying from container to host (wrong direction)
β Wrong container name (ubuntu_latest must match exactly)
β Wrong destination path
β Using scp or rsync instead of docker cp
π§ Part 2: Simple Step-by-Step Explanation (Beginner Friendly)
πͺ What are we doing?
The encrypted file already exists on the Docker host
We use Dockerβs built-in copy command
Docker copies the file byte-for-byte (no changes)
π Command Breakdown
docker cp /tmp/nautilus.txt.gpg ubuntu_latest:/usr/src/
docker cp β copy files between host and container
/tmp/nautilus.txt.gpg β source file on host
ubuntu_latest: β target container
/usr/src/ β destination directory inside container
π This preserves the file exactly as-is.
π§ Exam Memory Hook
docker cp = safe, direct, no modification
Always verify with:
docker exec ls
Top comments (0)