【发布时间】:2016-02-02 13:56:53
【问题描述】:
我的英语不好,对不起! 我使用 docker 安装 gitlab 服务器。
首先我安装 Docker Toolbox,然后按照以下步骤操作:
步骤 1. 启动 postgresql 容器
docker run --name gitlab-postgresql -d \
--env 'DB_NAME=gitlabhq_production' \
--env 'DB_USER=gitlab' --env 'DB_PASS=password' \
--volume /srv/docker/gitlab/postgresql:/var/lib/postgresql \
sameersbn/postgresql:9.4-12
步骤 2. 启动一个 redis 容器
docker run --name gitlab-redis -d \
--volume /srv/docker/gitlab/redis:/var/lib/redis \
sameersbn/redis:latest
步骤 3. 启动 gitlab 容器
docker run --name gitlab -d \
--link gitlab-postgresql:postgresql --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' \
--volume /srv/docker/gitlab/gitlab:/home/git/data \
sameersbn/gitlab:8.4.2
结束后,我可以通过http://192.168.99.100:10080访问gitlab服务器,并且可以创建项目,但是我不能通过http://localhost:10080访问gitlab服务器,别人不能上传下载,应该不要做端口转发,我应该怎么办?
【问题讨论】: