Created
September 12, 2021 23:16
-
-
Save RodneyPerez/8b6b3914e63a7c5d7a612dd2ce30327d to your computer and use it in GitHub Desktop.
Docker pull and mount
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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