Wednesday, May 13, 2020

Deploy Gitlab-ce 12.10.3 on docker 19.03

Get gitlab images

docker pull gitlab/gitlab-ce:12.10.3-ce.0

Run the gitlab image

docker run --detach \ --hostname 192.168.56.122 \ --publish 30080:30080 \ --publish 30022:22 \ --name gitlab01 \ --restart unless-stopped \ --volume /Data/docker-data/gitlab/config:/etc/gitlab \ --volume /Data/docker-data/gitlab/logs:/var/log/gitlab \ --volume /Data/docker-data/gitlab/data:/var/opt/gitlab \ gitlab/gitlab-ce:12.10.3-ce docker run --detach \ --hostname gitlab01 \ --publish 443:443 --publish 80:80 --publish 10022:22 \ --name gitlab01 \ --restart always \ --volume /Data/docker-data/gitlab/config:/etc/gitlab \ --volume /Data/docker-data/gitlab/logs:/var/log/gitlab \ --volume /Data/docker-data/gitlab/data:/var/opt/gitlab \ gitlab/gitlab-ce:12.10.3-ce.0

container status

[root@localhost ~]# docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES b36dbb18c99d gitlab/gitlab-ce:12.10.3-ce.0 "/assets/wrapper" 33 seconds ago Up 31 seconds (health: starting) 80/tcp, 443/tcp, 0.0.0.0:30080->30080/tcp, 0.0.0.0:30022->22/tcp gitlab01

change gitlab port (port fordware)

docker exec -it gitlab01 /bin/bash vi /opt/gitlab/embedded/service/gitlab-rails/config/gitlab.yml port 30080 vi /opt/gitlab/embedded/conf/nginx.conf server { listen 30080; server_name localhost; vi /etc/gitlab/gitlab.rb gitlab_rails['gitlab_shell_ssh_port'] = 30022 external_url 'http://192.168.56.122:30080' gitlab-ctl reconfigure gitlab-ctl restart

No comments:

Post a Comment