Runtime File Drop
Part of the Introduction to Docker section of Coddy's Terminal journey — lesson 40 of 40.
Challenge
MediumDeliver a file into a live container and read it back. A file named report.txt is in your directory. Run these commands one after the other:
- Start a detached
nginxcontainer namedhost - Copy
report.txtinto it at/report.txt - Use
docker exectocat /report.txtfrom inside - Confirm the container is still running with
docker inspect --format "{{.State.Status}}"
Try it yourself
Terminal