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

Run container mount external disk

docker run --rm "-v%CD%:/opt" -w /opt -it busybox
  • -w to set the default workdir inside the container
  • -v to mount an external folder to an internal folder
  • %CD% is the current folder in Windows (outside)
  • /opt is the folder inside
  • We need double-quotes around it as the currecnt working directory on windows can contain spaces and other special characters.
  • --rm to remove the container at the end of the run
  • -it interactive mode