Docker Copy Operations Kodekloud

 

Question: The Nautilus DevOps team has some conditional data present on App Server 1 in Stratos Datacenter. There is a container ubuntu_latest running on the same server. We received a request to copy some of the data from the docker host to the container. Below are more details about the task:

On App Server 1 in Stratos Datacenter copy an encrypted file /tmp/nautilus.txt.gpg from docker host to ubuntu_latest container (running on same server) in /home/ location. Please do not try to modify this file in any way.


Solution: 

Login to mentioned server

ssh tony@stapp02

Login as root

sudo su

Then check docker container

docker ps

Copy the file

docker cp /tmp/nautilus.txt.gpg ubuntu_latest:/home

Check the file

docker exec ubuntu_latest ls /home

docker exec ubuntu_latest ls -ltr /home


Download Coding Interview Book and Get More Tutorials for Coding and Interview Solution: Click Here

Download System Design Interview Book and Get More Tutorials and Interview Solution: Click Here

Do you need more Guidance or Help? Then Book 1:1 Quick Call with Me: Click Here

Share on Google Plus

About Ashadullah Shawon

I am Ashadullah Shawon. I am a Software Engineer. I studied Computer Science and Engineering (CSE) at RUET. I Like To Share Knowledge. Learn More: Click Here
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment