Created
January 25, 2015 15:59
-
-
Save georgefs/71408ec0eaae262d2398 to your computer and use it in GitHub Desktop.
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
#! /bin/bash | |
# | |
# docker.sh | |
# Copyright (C) 2015 george.li <vagrant@vagrant-ubuntu-trusty-64> | |
# | |
# Distributed under terms of the MIT license. | |
# | |
img="tagtoo/quick-env" | |
curr=`pwd` | |
docker_run="sudo docker run -i --rm -v $curr:/srv/work -w /srv/work -t $img " | |
case $1 in | |
"test" ) | |
$docker_run nosetests . | |
;; | |
"build" ) | |
docker pull $img | |
docker_run npm install | |
docker_run pip install -r requirements.txt | |
;; | |
"run" ) | |
cmd=`echo $@|sed "s/^\s*run//"` | |
$docker_run $cmd | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment