Skip to content

Instantly share code, notes, and snippets.

@rlan
Last active January 24, 2019 06:29
Show Gist options
  • Select an option

  • Save rlan/de27c203f1f348da425ee2f164d90088 to your computer and use it in GitHub Desktop.

Select an option

Save rlan/de27c203f1f348da425ee2f164d90088 to your computer and use it in GitHub Desktop.
Launch a docker image
#!/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