Using bind mount directories in Docker

$(pwd)/binddir - is the bind mount directory. We can mount it in 2 ways:

docker run --rm -dit name bind1 --mount type=bind,source="$(pwd)"/binddir, target=/app nginx
docker run --rm -dit name bind2 -v "$(pwd)"/binddir:/app nginx
Verify:
docker exec bind1 ls -l /app
docker inspect bind2 # check Mounts section or HostConfig.Binds