# https://docs.gitlab.com/omnibus/docker/README.html#install-gitlab-using-docker-compose
version: "3.6"
services:
gitlab:
image: gitlab/gitlab-ce:latest
container_name: my_gitlab
restart: always
ports:
- "80:80"
- "443:443"
- "8822:22"
volumes:
- /data/gitlab/data:/var/opt/gitlab
- /data/gitlab/logs:/var/log/gitlab
- /data/gitlab/config:/etc/gitlab
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'http://192.168.20.220'
# Add any other gitlab.rb configuration here, each on its own line
gitlab_rails['gitlab_shell_ssh_port'] = 8822
这里ssh端口没有使用默认的 22