- 创建docker-compose.yaml文件
- 输入docker-compose配置
version: '3.8'
services:
gitlab:
image: gitlab/gitlab-ce:15.11.2-ce.0
restart: always
container_name: gitlab-ce
privileged: true
hostname: 192.168.44.235
environment:
TZ: Asia/Shanghai
GITLAB_OMNIBUS_CONFIG: |
external_url 'http://192.168.44.235'
gitlab_rails['time_zone'] = 'Asia/Shanghai'
gitlab_rails['gitlab_ssh_host'] = '192.168.44.235'
gitlab_rails['gitlab_shell_ssh_port'] = 8822
ports:
- "83:80"
- "12443:443"
- "8822:22"
volumes:
- /opt/soft/gitlab/certs:/etc/gitlab/ssl
- /opt/soft/gitlab/config:/etc/gitlab
- /opt/soft/gitlab/logs:/var/log/gitlab
- /opt/soft/gitlab/data:/var/opt/gitlab
-
启动容器
docker compose up -d
作者:Kkoo
著作权归作者所有。商业转载请联系作者进行授权,非商业转载请注明出处。