Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to build gitLab Environment for Docker

Shulou Source: shulou.com Published: 2022-06-01 01:15:07 09月22日 Update

This article is about how Docker builds a gitLab environment. Xiaobian thinks it is quite practical, so share it with everyone for reference. Let's follow Xiaobian and have a look.

Environmental Preparation:

Operating system version:

[root@izwz94n23 ~]# lsb_release -aLSB Version: :core-4.1-amd64:core-4.1-noarchDistributor ID: CentOSDescription: CentOS Linux release 7.3.1611 (Core) Release: 7.3.1611Codename: Core

Docker Version:

[root@izwz94n2 ~]# docker --versionDocker version 1.12.6, build c4618fb/1.12.6

Second, download the image

docker pull docker.io/gitlab/gitlab-ce

view the image

[root@izwz94n2315 ~]# docker imagesREPOSITORY TAG IMAGE ID CREATED SIZEdocker.io/gitlab/gitlab-ce latest 453d64ae84c7 2 weeks ago 1.277 GB

Run the image

docker run --detach --hostname X.X.X.X --publish 8099:80 --publish 2222:22 --name gitlab --restart always --volume /srv/gitlab/config:/etc/gitlab:z --volume /srv/gitlab/logs:/var/log/gitlab:z --volume /srv/gitlab/data:/var/opt/gitlab:z 453d64ae84c7

4. Configure GitLab

docker exec -it gitlab vi /etc/gitlab/gitlab.rb

Configure the external_url parameter in gitlab.rb to a valid host address, such as http://www.xxxx.com or http://x.x.x

5. Restart gitlab service

docker restart gitlab

6. Open the external_url address on the browser, plus the port number specified when creating the container.

http://x.x.x.x:8099

Open the password for the first time, and then log in. The user name is root. The login is successful as follows

Thank you for reading! About "Docker how to build gitLab environment" this article is shared here, I hope the above content can be of some help to everyone, so that everyone can learn more knowledge, if you think the article is good, you can share it to let more people see it!

Tags: Environment content address more version article image login good practical effective success operating system parameters slogan container password article browser user Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno macOS vpn Redmi Xiaomi