docker安装gitlab实践

通过docker容器安装gtlab代码库:

docker run --detach \
--hostname 192.168.102.62 \ --env GITLAB_OMNIBUS_CONFIG="external_url 'http://192.168.102.62/'; gitlab_rails['lfs_enabled'] = true;" \ --publish 2443:443 --publish 280:80 --publish 222:22 \ --name gitlab \ --restart always \ --volume /srv/gitlab/config:/etc/gitlab \ --volume /srv/gitlab/logs:/var/log/gitlab \ --volume /srv/gitlab/data:/var/opt/gitlab \ gitlab/gitlab-ce:latest

根据主机的端口使用情况修改。

注意:

--detach参数是-d的全称,表示后台运行容器

猜你喜欢

转载自www.cnblogs.com/jarno/p/11881305.html