Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Docker: Mounting external host directory as a volume (Linux, macOS hosts)

$ docker run -it --rm -v $(pwd):/opt/ mydocker

# cd /opt
# ls -l

The -v HOST:CONTAINER will mount the HOST directory of the home operating system to the CONTAINER directory in the Docker container.