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-productsusing the default driver? - How would you run a container using the Alpine image and mount the
my-productsvolume in read-only mode into the/datacontainer folder? - How would you locate the folder that is associated with the
my-productsvolume 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-productsvolume to the/app-datafolder, in read/write mode? Inside this container, navigate to the/app-datafolder and create ahello.txtfile 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...