docker run --mount type=bind,src=/host/path,dst=/container/path nginx

Category: Docker

docker run --mount type=bind,src=/host/path,dst=/container/path nginx

Mount a host directory with short flag names

Binds /host/path from the host into /container/path in the container; changes appear on both sides. src and dst are short aliases for source and target in --mount syntax. Bind mounts are not managed by docker volume commands.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.