How To Share Data Between the Docker Container and the Host Introduction In general, Docker containers are ephemeral, running just as long as it takes for the command issued in the container to complete. By default, any data created inside the container is only available from within the container and only while the container is running. Docker volumes can be used to share files between a host system and the Docker container. For example, let's say you wanted to use the official Docker Nginx image and keep a permanent copy of Nginx's log files to analyze later. By default, the nginx Docker image will log to the /var/log/nginx directory inside the Docker Nginx container. Normally it's not reachable from the host filesystem. In this tutorial, we'll explore how to make data from inside the container accessible on the host machine. Prerequisites To follow this article, you will need an Ubuntu 18.04 server with the following: A no...