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)
Result:Implementation Code html <link href=...
Mysql is a popular and easy-to-use database softw...
No matter how wonderful your personal website is,...
This article example shares the specific code of ...
Docker download address: http://get.daocloud.io/#...
jQuery realizes the effect of theater seat select...
The solution to the transparent font problem after...
rep / egrep Syntax: grep [-cinvABC] 'word'...
Table of contents Dockerfile pom.xml Jenkins Conf...
I recently encountered a bug where I was trying t...
<br />Original text: http://blog.rexsong.com...
Table of contents 1.sleep function 2. setTimeout ...
In the MySQL database, after tables are associate...
This article records the installation tutorial of...
question When I was writing a project function to...