Questions
Please try to answer the following questions to assess your learning progress:
- How would you create a named data volume with a name such as
my-products
using the default driver? - How would you run a container using the Alpine image and mount the
my-products
volume in read-only mode into the/data
container folder? - How would you locate the folder that is associated with the
my-products
volume and navigate to it? Also, how would you create a file,sample.txt
, with some content? - How would you run another Alpine container where you mount the
my-products
volume to the/app-data
folder, in read/write mode? Inside this container, navigate to the/app-data
folder and create ahello.txt
file with some content. - How would you mount a host volume – for example,
~/my-project
– into a container? - How would you remove all unused volumes from your system?
- The list of environment variables that an application running in a container sees is the same...