August 2018
Intermediate to advanced
352 pages
12h 30m
English
Perform the following steps:
Let's begin by creating a new directory called data_share in our home directory, as shown in the following code:
$ mkdir $HOME/data_share
$ echo "data sharing demo" > $HOME/data_share/demo.txt
$ docker container run --rm \ -v $(HOME)/data_share:/data \ ubuntu cat /data/demo.txt data sharing demo
In this recipe, we effectively shared a file from the Docker host to the container. Though this is a very simple example, it is a very powerful mechanism to share your application configuration, ...
Read now
Unlock full access