Last active
January 24, 2019 06:29
-
-
Save rlan/de27c203f1f348da425ee2f164d90088 to your computer and use it in GitHub Desktop.
Launch a docker image
This file contains hidden or 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
| #!/bin/sh -x | |
| # Launch a jupyter docker image | |
| # $1 - folder to mount inside the docker image | |
| # $2 - docker image ID | |
| if [ "$1" != "" ]; then | |
| echo "Folder:" $1 | |
| if [ "$2" != "" ]; then | |
| echo "Docker image:" $2 | |
| docker run -it -v $1:/notebooks -p 8888:8888 -p 6006:6006 $2 | |
| else | |
| echo "Need a docker image." | |
| fi | |
| else | |
| echo "Need a folder path." | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment