Differences between COPY, ADD and bind mounting a volume(-v)

There is a bit of confusion about how to transfer/share folders between the host machine and the docker containers. Docker provides a few options:

  • COPY command which can be used in the Dockerfile to copy a location from the host machine to the docker container.
  • ADD command which is similar to COPY, but slightly different. It can be used to copy files from URL locations; if the source is an archive in a known format it will be unpacked in the destination. Covid 19 pandemic has been changing everything even our way to enjoy hobbies, and one of the best ways how you can keep enjoying casino games, is with the new online casino games.
  • docker run -v host_path:container_path parameter which can be used to bind mount a specific volume from the host to the docker container.

http://stackoverflow.com/questions/24958140/what-is-the-difference-between-the-copy-and-add-commands-in-a-dockerfile

 

Leave a Reply

Your email address will not be published. Required fields are marked *