deploy gitlab through docker

avatar
作者
猴君
阅读量:0

use docker

export GITLAB_HOME=/vol2/gitlab2/apollo  docker run --detach \   --hostname HOSTNAME \   --publish 11000:443 --publish 11001:80 --publish 11002:22 \   --name apollo \   --restart always \   --volume $GITLAB_HOME/config:/etc/gitlab \   --volume $GITLAB_HOME/logs:/var/log/gitlab \   --volume $GITLAB_HOME/data:/var/opt/gitlab \   --shm-size 256m \   gitlab/gitlab-ee:latest 

use docker-compose

vim docker-compose.yml  version: '3.6'  services:   web:     image: gitlab/gitlab-ee     container_name: gitlab     restart: always     hostname: 192.168.242.66  # Change to your domain or IP     environment:       GITLAB_OMNIBUS_CONFIG: |         external_url 'http://192.168.242.66:11000'  # Change to your domain or IP         letsencrypt['enable'] = false     network_mode: bridge  # Set network mode to bridge     ports:       - "11000:80"      # HTTP       - "11001:443"    # HTTPS       - "11002:22"      # SSH     volumes:       - gitlab-config:/vol2/gitlab2/config       - gitlab-log:/vol2/gitlab2/log       - gitlab-data:/vol2/gitlab2/data     tmpfs:       - /vol2/gitlab2/shm:size=2g volumes:   gitlab-config:   gitlab-log:   gitlab-data:  docker-compose up -d 
note: 	i succeed in docker 		but don't in docker-compose 

广告一刻

为您即时展示最新活动产品广告消息,让您随时掌握产品活动新动态!