#http://www.jianshu.com/p/060e7223e211?open_source=weibo_search
docker stop gitlab
docker stop redis
docker stop postgresql
docker rm gitlab
docker rm redis
docker rm postgresql
docker run --name postgresql -d \
-e ‘DB_NAME=gitlabhq_production‘ \
-e ‘DB_USER=gitlab‘ \
-e ‘DB_PASS=password‘ \
-e ‘DB_EXTENSION=pg_trgm‘ \
-v /home/root/opt/postgresql/data:/var/lib/postgresql \
sameersbn/postgresql
docker run --name redis -d \
-v /home/root/opt/redis/data:/var/lib/redis \
sameersbn/redis
docker run --name gitlab -d \
--link postgresql:postgresql --link redis:redisio \
-p 10022:22 -p 10080:80 \
-e ‘GITLAB_PORT=10080‘ \
-e ‘GITLAB_SSH_PORT=10022‘ \
-e ‘GITLAB_SECRETS_DB_KEY_BASE=long-and-random-alpha-numeric-string‘ \
-e ‘GITLAB_SECRETS_SECRET_KEY_BASE=long-and-random-alpha-numeric-string‘ \
-e ‘GITLAB_SECRETS_OTP_KEY_BASE=long-and-random-alpha-numeric-string‘ \
-e ‘GITLAB_HOST=106.75.154.204‘ \
-e ‘[email protected]‘ \
-e ‘GITLAB_BACKUP_SCHEDULE=daily‘ \
-e ‘GITLAB_BACKUP_TIME=10:30‘ \
-v /home/root/opt/gitlab/data:/home/git/data \
sameersbn/gitlab
docker run -p 3308:3306 --name mysql-test -v /var/docker_data/mysql/data/:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=root -e MYSQL_USER=dev -e MYSQL_PASSWORD=dev -d mysql