Skip to content

Instantly share code, notes, and snippets.

@RodneyPerez
Created September 12, 2021 23:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RodneyPerez/8b6b3914e63a7c5d7a612dd2ce30327d to your computer and use it in GitHub Desktop.
Save RodneyPerez/8b6b3914e63a7c5d7a612dd2ce30327d to your computer and use it in GitHub Desktop.
Docker pull and mount
#Pull python image
docker pull python
#Pull ruby image
docker pull ruby
# Runs a bash shell in this python image
# rm removes the container once the command finishs
# it allows an the shell to interact with stdin
# v volume says to mount current directory to the app folder
docker run --rm -it -v $(pwd):/app python bash
# then you can run
python app/hello.py
docker run --rm -it -v $(pwd):/app ruby bash
ruby app/hello.rb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment