gitlab|gitlab 安装_5个步骤docker安装gitlab

亲自验证,仅5个步骤:
1、拉取git镜像
docker pull gitlab/gitlab-ce:latest
2、创建docker container
docker run -d
--publish 8443:443 --publish 8080:8080 --publish 2222:22
--name gitlab
--restart always
--volume /usr/local/gitlab/config:/etc/gitlab
--volume /usr/local/gitlab/logs:/var/log/gitlab
--volume /usr/local/gitlab/data:/var/opt/gitlab
gitlab/gitlab-ce
3、配置gitlab服务器的访问地址
vi /usr/local/gitlab/config/gitlab.rb
修改: external_url 'http://xxx.xxx.xxx.xxx'(服务器ip)
修改:nginx['redirect_http_to_https_port'] = 8080
修改:gitlab_rails['gitlab_shell_ssh_port'] = 2222
4、重启:docker restart gitlab
【gitlab|gitlab 安装_5个步骤docker安装gitlab】5、登录gitlab,管理员:root,密码:重设

gitlab|gitlab 安装_5个步骤docker安装gitlab
文章图片
若出现502问题
unicorn['port'] = 8888
gitlab_workhorse['auth_backend'] = "http://localhost:8888"
gitlab_rails['webhook_timeout'] = 90

    推荐阅读