You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
546 B

  1. # Configs
  2. MYSQL_PASSWORD="kuajie8402"
  3. MYSQL_RUN_NAME="gogs_mysql"
  4. typeset -u MYSQL_ALIAS
  5. MYSQL_ALIAS="db"
  6. HOST_PORT="3000"
  7. DOCKER_BIN=$(which docker.io || which docker)
  8. if [ -z "$DOCKER_BIN" ] ; then
  9. echo "Please install docker. You can install docker by running \"wget -qO- https://get.docker.io/ | sh\"."
  10. exit 1
  11. fi
  12. ## Run MySQL image with name
  13. $DOCKER_BIN run -d --name $MYSQL_RUN_NAME gogs/mysql
  14. #
  15. ## Run gogits image and link it to the MySQL image
  16. $DOCKER_BIN run --link $MYSQL_RUN_NAME:$MYSQL_ALIAS -p $HOST_PORT:3000 gogs/gogits