The Nautilus DevOps team possesses confidential data on App Server 3
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.
ssh banner@stapp03
# List running containers
docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
9e0766142893 ubuntu "/bin/bash" 4 minutes ago Up 3 minutes ubuntu_latest
# Verify file exists on host in tmp
ls -l /tmp
-rw-r--r-- 1 root root 105 Sep 12 14:56 nautilus.txt.gpg
# Copy file into docker container
docker cp /tmp/nautilus.txt.gpg ubuntu_latest:/usr/src/
Successfully copied 2.05kB to ubuntu_latest:/usr/src/
# Verify the file has been copied to the container
docker exec -it ubuntu_latest ls -l /usr/src/
total 4
-rw-r--r-- 1 root root 105 Sep 12 14:56 nautilus.txt.gpg
# Confirm that the file wasn't modified - compare sha256sum's
sha256sum /tmp/nautilus.txt.gpg
38c9e365c72e76610f7db9408b7658811dfdabf45a0a2ddd2206d211893f9316 /tmp/nautilus.txt.gpg
docker exec -it ubuntu_latest sha256sum /usr/src/nautilus.txt.gpg
38c9e365c72e76610f7db9408b7658811dfdabf45a0a2ddd2206d211893f9316 /usr/src/nautilus.txt.gpg