Skip to content

Instantly share code, notes, and snippets.

@PureKrome
Last active June 9, 2021 08:44
Show Gist options
  • Save PureKrome/78034bb9285a78da2e0d685e9516c4e2 to your computer and use it in GitHub Desktop.
Save PureKrome/78034bb9285a78da2e0d685e9516c4e2 to your computer and use it in GitHub Desktop.
Running a docker image which shares a windows folder with a folder inside the docker instance

docker run --rm -it -v ${PWD}:/src/scripts --name XXXXXX IMAGENAME /bin/bash

  • --rm this instance will be deleted once we 'exit' the image
  • -it interactive mode
  • -v sharing folders (called sharing VOLUMES)
  • ${PWD} source folder
  • : denotes that we're sharing between these two volumes
  • /src/scripts the destination folder. In this case, it's inside a linux image. Also, this folder will be created.
  • /bin/bash this is the command to run .. which means we now have a 'shell' to access/run stuff inside this image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment