diff options
author | Unknwon <joe2010xtmf@163.com> | 2014-07-26 00:24:27 -0400 |
---|---|---|
committer | Unknwon <joe2010xtmf@163.com> | 2014-07-26 00:24:27 -0400 |
commit | 8dd07c0ddd99ae626a1ec8c06f75f27fed51269f (patch) | |
tree | 261d3c9911dabc58c1ac54e4e36b3dee24d2032b /scripts/dockerfiles/run.sh | |
parent | 0a739cf9ac901f54484c34bba8322418dedb09b0 (diff) |
New UI merge in progress
Diffstat (limited to 'scripts/dockerfiles/run.sh')
-rwxr-xr-x | scripts/dockerfiles/run.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/scripts/dockerfiles/run.sh b/scripts/dockerfiles/run.sh new file mode 100755 index 00000000..cef2ebb8 --- /dev/null +++ b/scripts/dockerfiles/run.sh @@ -0,0 +1,19 @@ +# Configs +MYSQL_PASSWORD="kuajie8402" +MYSQL_RUN_NAME="gogs_mysql" +typeset -u MYSQL_ALIAS +MYSQL_ALIAS="db" +HOST_PORT="3000" + +DOCKER_BIN=$(which docker.io || which docker) +if [ -z "$DOCKER_BIN" ] ; then + echo "Please install docker. You can install docker by running \"wget -qO- https://get.docker.io/ | sh\"." + exit 1 +fi + +## Run MySQL image with name +$DOCKER_BIN run -d --name $MYSQL_RUN_NAME gogs/mysql +# +## Run gogits image and link it to the MySQL image +$DOCKER_BIN run --link $MYSQL_RUN_NAME:$MYSQL_ALIAS -p $HOST_PORT:3000 gogs/gogits + |