docker run -v /host/path:/container/path nginx

Category: Docker

docker run -v /host/path:/container/path nginx

Mount a host directory into the container

Mounts a folder from your host machine into the container. Changes in the folder are visible inside the container.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.