| 123456789101112131415161718192021222324252627 | # ConfigsMYSQL_PASSWORD="YOUR_MYSQL_PASSWORD"MYSQL_RUN_NAME="YOUR_MYSQL_RUN_NAME"typeset -u MYSQL_ALIASMYSQL_ALIAS="YOUR_MYSQL_ALIAS"HOST_PORT="YOUR_HOST_PORT"# Replace the mysql root password in MySQL image Dockerfile.sed -i "s/THE_MYSQL_PASSWORD/$MYSQL_PASSWORD/g" images/mysql/Dockerfile# Replace the mysql root password in gogits image Dockerfile.sed -i "s/THE_MYSQL_PASSWORD/$MYSQL_PASSWORD/g" images/gogits/Dockerfile# Build the MySQL imagecd images/mysqldocker build -i gogs/mysql .# Build the gogits imagecd images/gogitsdocker build -i gogs/gogits .# Run MySQL image with namedocker run -d --name $MYSQL_RUN_NAME gogs/mysql# Run gogits image and link it to the MySQL imagedocker run --link $MYSQL_RUN_NAME:$MYSQL_ALIAS -p $HOST_PORT:3000 gogs/gogits
 |