The VOLUME instruction

The VOLUME instruction creates a directory in the image filesystem, which can later be used for mounting volumes from the Docker host or the other containers.

The VOLUME instruction has two types of syntax, as shown here:

  • The first type is either exec or JSON array (all values must be within double-quotes (")):
      VOLUME ["<mountpoint>"] 
  • The second type is the shell, as shown here:
      VOLUME <mountpoint> 

In the preceding lines, <mountpoint> is the mount point that has to be created in the new image.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset