Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How centos7 uses docker to deploy gitlab-ce-zh applications

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article is about how centos7 uses docker to deploy gitlab-ce-zh applications. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

1. It is slow to pull the image in China, so the DaoCloud source is used here.

# curl-sSL https://get.daocloud.io/daotools/set_mirror.sh | sh-s http://43049fd0.m.daocloud.io

two。 Pull the image

# docker pull twang2218/gitlab-ce-zh

3. Start the container

Docker run-- detach\-- hostname git.xiaohuruwei.com\-- publish 8443-- publish 8080-- publish 2222-- name gitlab\-- restart always\-- volume / srv/gitlab/config:/etc/gitlab\-- volume / srv/gitlab/gitlab/logs:/var/log/gitlab\-- volume / srv/gitlab/gitlab/data:/var/opt/gitlab\ twang2218/gitlab-ce-zh:latest

4. Command parameter interpretation

-- hostname specifies the domain name bound in the container, which will be used when creating the image warehouse. Here the git.xiaohuruwei.com-publish port mapping is bound. The colon is preceded by the host port, followed by the port out of the container expose-volumevolume mapping. The colon is preceded by a file path of the host, followed by the file path in the container.

5. Local access address

Git.xiaohuruwei.com

Note: the password needs to be set when opening it for the first time. The default user name is root.

Ssh access

Because it is deployed using docker, there are two layers of authentication for access through ssh (such as git clone git@git.xiaohuruwei.com):

The first layer is the authentication of freelancer server.

The other layer is the certification of gitlab.

The latter needs to use ssh-key

The former may require reverse proxies of ssh itself (the nginx currently used does not support reverse proxies other than http,https)

Now it is difficult to use port forwarding, but you can change the default gitlab ssh port to a non-standard port:

Directly modify the variables in the gitlab configuration file:

Gitlab_shell_ssh_port = 2222

Then restart the docker container, and you can see the corresponding ssh address change in the web interface: ssh://git@git.xiaohuruwei.com:2222/root/test.git can then directly continue to use git clone to continue the operation.

Thank you for reading! This is the end of the article on "how centos7 uses docker to deploy gitlab-ce-zh applications". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report