1. Install Docker#1. Uninstall the old version yum remove docker \ docker-client \ docker-client-latest \ docker-common \ docker-latest \ docker-latest-logrotate \ docker-logrotate \ docker-engine #2. Download the required installation package sudo yum install -y yum-utils #3. Set up a mirrored warehouse. It is recommended to use Alibaba Cloud's yum-config-manager, which is very fast. --add-repo \ http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo #4. Update the yum package index yum makecache #5 Install the latest version of containerd.io dnf install https://download.docker.com/linux/centos/7/x86_64/stable/Packages/containerd.io-1.2.6-3.3.el7.x86_64.rpm #6. Install docker-related content docker-ce community edition ee enterprise edition sudo yum install docker-ce docker-ce-cli --allowerasing #7. Start Docker systemctl start docker #8. Determine whether the docker version is started successfully 2. Install GitLabOfficial Documentation ①. Create a new container data volume folder mkdir /data/gitlab/config -p mkdir /data/gitlab/logs -p mkdir /data/gitlab/data -p ②Run docker run --detach \ --hostname localhost \ --publish 4443:443 --publish 8880:80 --publish 2222:22 \ --name gitlab \ --restart always \ --volume /data/gitlab/config:/etc/gitlab \ --volume /data/gitlab/logs:/var/log/gitlab \ --volume /data/gitlab/data:/var/opt/gitlab \ gitlab/gitlab-ee:latest
docker logs -f gitlab ③. Optimize memory usage. If the configuration is high enough, you can skip the optimization.
vim /data/gitlab/gitlab.rb Ⅰ. Change memory limit settings
II. Reduce database cache
III. Reduce the number of concurrent databases
④. Access test
firewall-cmd --zone=public --add-port=8880/tcp --permanent firewall-cmd --zone=public --add-port=4443/tcp --permanent firewall-cmd --zone=public --add-port=2222/tcp --permanent
ip addr
3. Initialize GitLab①. Login
docker exec -it gitlab grep 'Password:' /etc/gitlab/initial_root_password
②、Create a project
③. Install Git yum install git git version 2.27.0 ④. Pull Project git clone http://localhost:8880/root/customproject.git ⑤. Test and push changes to remote cd customproject/touch test.txtgit add test.txtgit commit -m 'test push'git push origin main ⑥. Create your own account
This is the end of this article about using Docker to build Gitlab based on CentOS8 system. For more relevant content about building Gitlab with Docker, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: Analysis and solution of the reasons for left and right jumps when loading web pages
>>: N ways to align the last row of lists in CSS flex layout to the left (summary)
HTML Design Pattern Study Notes This week I mainl...
Preface We all know that MySQL query uses the sel...
Using ajax to implement form submission without re...
As a programmer who has just learned Tomcat, this...
Preface When the HTML structure of a page contain...
I just started learning about databases recently....
If someone asked you whether running EXPLAIN on a...
max_allowed_packet is a parameter in MySQL that i...
Preface In the development of actual projects, we...
The difference between http and https is For some...
Table of contents 1. Environment variable $PATH: ...
Table of contents Preface Find the problem solve ...
Let's first look at some simple data: Accordin...
01. Infinity Font Download 02. Banda Font Download...
The basic structure of HTML hypertext documents is...