🐳 Day 37: Copy File to Docker Container | 100 Days of DevOps
Welcome to Day 37 of the 100 Days of DevOps series! In this lab, you’ll learn how to securely copy a file from a host machine into a running Docker container — a common real-world task when handling application data.
📌 Lab Objective:
Copy an encrypted file from the Docker host to a running container without modifying it.
🛠️ Task Requirements:
Server: App Server 2
Container Name: ubuntu_latest
Source File: /tmp/nautilus.txt.gpg
Destination Path (inside container): /opt/
💻 Step-by-Step Solution:
🔹 1. Verify container is running
docker ps
👉 Ensure ubuntu_latest is listed
🔹 2. Copy file into container
docker cp /tmp/nautilus.txt.gpg ubuntu_latest:/opt/
🔹 3. Verify inside container
docker exec -it ubuntu_latest ls /opt/
👉 Expected output:
nautilus.txt.gpg
📚 What You’ll Learn:
How to transfer files into containers
Using docker cp command
Working with running containers
Handling sensitive encrypted files securely
🌟 Why This Lab Matters:
In real DevOps workflows, you often need to move configuration files, backups, or encrypted data into containers without altering them.
🎯 Series: 100 Days of DevOps
Level up your real-world DevOps skills step by step.
🔔 Follow OtterTech for more hands-on labs and practical learning!
#Docker #DevOps #Containers #Linux #Cloud #100DaysOfDevOps #OtterTech #Day37