Skip to content

Instantly share code, notes, and snippets.

@boundedinfinity
Last active March 27, 2017 16:32
Show Gist options
  • Save boundedinfinity/9fcc97b63a950119e2adc86bdd26c9b1 to your computer and use it in GitHub Desktop.
Save boundedinfinity/9fcc97b63a950119e2adc86bdd26c9b1 to your computer and use it in GitHub Desktop.
Che wrapper script
#!/usr/bin/env bash
che_version=5.5.0
workspace=${CHE_WORKSPACE:-$HOME/che}
if [[ ! -d "$workspace" ]] ; then
mkdir -p "$workspace"
fi
opt_chedir="-v $PWD:/chedir"
opt_socketdir="-v /var/run/docker.sock:/var/run/docker.sock"
opt_datadir="-v $workspace:/data"
command="docker run -it --rm $opt_socketdir $opt_datadir $opt_chedir eclipse/che:$che_version $@"
if [[ -n "$CHE_DEBUG" ]] ; then
echo "$command"
fi
eval "$command"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment