Search code examples
dockerdocker-composedocker-volumenexus3docker-run

What's is the different between docker volume with mountpoint docker volumes


What's is the different between docker volume with mountpoint docker volumes, please see the attached picture

Can someone help me?

Two volumes, different configuration


Solution

  • Mountpoint When you use a bind mount, a file or directory on the host machine is mounted into a container. The file or directory is referenced by its absolute path on the host machine. The file or directory does not need to exist on the Docker host already. It is created on demand if it does not yet exist.

    Volumes vs Bind Mounts

    • With Bind Mount, a file or directory on the host machine is mounted into a container. The file or directory is referenced by its full or relative path on the host machine.
    • With Volume, a new directory is created within Docker's storage directory on the host machine, and Docker manages that directory's content.

    Reference: