Gitlab vessel deployment system in Ubuntu

Container deployment gitlab

Get image file

1. Download the image file

docker pull beginor/gitlab-ce:11.0.1-ce.

2. Create a configuration GitLab's (etc), log (log), data (data) three folders, outside into the container, to facilitate future upgrades, so please prepare three directories

mkdir -p /mnt/gitlab/etc
mkdir -p /mnt/gitlab/log
mkdir -p /mnt/gitlab/data

3. When you are ready three directories, you can begin to run Docker mirrored

docker run \
    --detach \
    --publish 8443:443 \
    --publish 8090:80 \
    --name gitlab \
    --restart unless-stopped \
    -v /mnt/gitlab/etc:/etc/gitlab \
    -v /mnt/gitlab/log:/var/log/gitlab \
    -v /mnt/gitlab/data:/var/opt/gitlab \
    beginor/gitlab-ce:11.0.1-ce.0

 Configuring the host name GitLab

1, modify /mnt/gitlab/etc/gitlab.rb; external_url into the deployment of domain name or IP address of the machine, where the command to add sudo, or else can not see into the data file

sudo vim /mnt/gitlab/etc/gitlab.rb

 

 

 2, modify /mnt/gitlab/data/gitlab-rails/etc/gitlab.yml

Find keywords * ## Web server settings * 

The external host ip address and port values ​​mapped into the host, here will be displayed in the address clone gitlab

host for the external host address; Port mapping external port

sudo vim /mnt/gitlab/data/gitlab-rails/etc/gitlab.yml

 

References:

https://blog.csdn.net/qq_38252039/article/details/89857348

 

 

 

 

 

 

Guess you like

Origin www.cnblogs.com/xingyunqiu/p/11584836.html