docker下搭建gitlab

[root@localhost ~]# docker run \
>   --name='gitlab' \
>   -itd \
>   --link gitlab_mysql:mysql \
>   --link gitlab_redis:redisio \
>   -e 'GITLAB_PORT=80' \
>   -e 'GITLAB_SSH_PORT=22' \
>   -p 10022:22 -p 10080:80 \
>   -v /var/run/docker.sock:/run/docker.sock \
>   -v $(which docker):/bin/docker \
>   -v /opt/gitlab/data:/home/git/data \
>   -v /opt/gitlab/log:/var/log/gitlab \
>   sameersbn/gitlab:latest
[root@localhost ~]# docker run \
>   --name=gitlab_mysql \
>   -tid \
>   -e 'DB_NAME=gitlabhq_production' \
>   -e 'DB_USER=gitlab' \
>   -e 'DB_PASS=password' \
>   -v /opt/gitlab/mysql:/var/lib/mysql \
>   sameersbn/mysql:latest
[root@localhost ~]# docker run --name gitlab -d \
> --link gitlab_mysql:mysql \
> --link gitlab_redis:redisio \
> --publish 10022:22 --publish 10080:80 \
> --env 'GITLAB_PORT=10080' --env 'GITLAB_SSH_PORT=10022' \
> --env 'GITLAB_SECRETS_DB_KEY_BASE=long-and-random-alpha-numeric-string' \
> -v /var/run/docker.sock:/run/docker.sock \
> -v $(which docker):/bin/docker \
> -v /opt/gitlab/data:/home/git/data \ 
> -v /opt/gitlab/log:/var/log/gitlab \
> sameersbn/gitlab:latest

posted @ 2017-02-20 20:24  Callum  阅读(416)  评论(0编辑  收藏  举报