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

Docker install gitlab

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

Share

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

1. Pull gitlab image

Command: docker pull gitlab/gitlab-ce

Description: pull gitlab image

two。 View local images

Command: docker images

Description: view the local image repository

3. Create a container and run

Command: docker run-d-p 443 Users/yunshuodeng/Work/hntx/gitlab/config:/etc/gitlab-v / Users/yunshuodeng/Work/hntx/gitlab/logs:/var/log/gitlab-v / Users/yunshuodeng/Work/hntx/gitlab/logs:/var/log/gitlab-v / Users/yunshuodeng/Work/hntx/data:/var/opt/gitlab/gitlab-ce gitlab/gitlab-ce

Description:

#-d: run in the background

#-p: map the internal port of the container to the outside

#-name: naming container name

#-v: Mount the data folder, log, configuration and other folders in the container to the specified directory of the host

4. Configure gitlab

Command: vi / Users/yunshuodeng/Work/hntx/gitlab/config/gitlab.rb

Modify the following parameters:

# configure the access address used by the http protocol

External_url 'http://192.168.2.15:9527'

# configure the access address and port used by ssh protocol

Gitlab_rails ['gitlab_ssh_host'] =' 192.168.199.231'

# this port is the 222nd port mapped by port 22 when run

Gitlab_rails ['gitlab_shell_ssh_port'] = 222

# Port number to listen to at startup

Nginx ['listen_port'] = 9527

# listen for all requests

Nginx ['listen_addresses'] = [' *']

5. Restart gitlab

Command: docker restart gitlab

6. View the startup log

Command: less / Users/yunshuodeng/Work/hntx/gitlab/logs/unicorn/unicorn_stderr.log

Description: start the log, after no error

7. Access address

Http://192.168.2.15:9527/

8. After the access is successful, you can log in. Please learn by yourself for specific use.

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