docker install gitlab-ce image, use other port

installation steps:

// Create a data directory
mkdir -p / data / gitlab / config
mkdir -p / data / gitlab / logs
mkdir -p / data / gitlab / data

// docker starts, install the mirror directly, here the external access port uses 82, ssh port It is 2222

// Everything here is misleading to be 80:80 or 81:80, Nima is useless
sudo docker run --detach \
--publish 5443: 443 \
--publish 82:82 \
--publish 2222: 22 \
--name gitlab \
--volume / data / gitlab / config: / etc / gitlab \
--volume / data / gitlab / logs: / var / log / gitlab \
--volume / data / gitlab / data: / var / opt / gitlab \
gitlab / gitlab-ce: 11.11.3-ce.0


vim /data/gitlab/config/gitlab.rb

// Modify the following statement
external_url 'http://192.168.2.102:82'

# https needs the following This sentence
# nginx ['redirect_http_to_https_port'] = 82

nginx ['listen_port'] = 82

# Configure port 2222
gitlab_rails ['gitlab_shell_ssh_port'] = 2222


// Restart gitlab
docker restart gitlab

Visit, my machine address is: http://192.168.2.102:82

At this point you have reached the login interface, use the root account to log in

The port for creating the project is also normal:

After adding the ssh key, it is used normally.

 

How to add ssh key to TortoiseGit, these are Baidu. There are many tutorials.

 

Thanks: https://www.cnblogs.com/aguncn/p/10336175.html

 

Guess you like

Origin www.cnblogs.com/lijinchang/p/12695372.html