I'm confused with what is different between creating docker volume create my-vol and VOLUME ["/var/www"].
My understanding is:
1) docker volume create my-vol creates a persistent volume on our machine and each container could be linked to my-vol.
2) VOLUME ["/var/www"] creates a volume inside its container.
And when I create another container, I could link
my-volas follows: when running a container$ docker run -d --name devtest --mount source=myvol2,target=/app nginx:latestAt that time, if I added
VOLUME ["/var/www"]in my Dockerfile, all data of this docker file will be stored in bothmyvol2and/var/www?