-
下载ce版本镜像
gitlab/gitlab-ce:17.3.6-ce.0
-
创建相关目录
bash
/home/lylgitlab/config
/home/lylgitlab/logs
/home/lylgitlab/data
/home/lylgitlab/other/gitlab.rb
/home/lylgitlab/other/shm
- 启动镜像
bash
#!/bin/sh
docker run --detach \
--hostname 20.198.40.20 \
-p 35643:443 -p 35680:80 -p 35622:22 \
--privileged \
--name gitlab \
--env GITLAB_LOG_LEVEL=info \
--restart always \
--volume /home/lylgitlab/config:/etc/gitlab \
--volume /home/lylgitlab/logs:/var/log/gitlab \
--volume /home/lylgitlab/data:/var/opt/gitlab \
--volume /home/lylgitlab/other/gitlab.rb:/etc/gitlab/gitlab.rb \
--volume /home/lylgitlab/other/shm:/dev/shm \
gitlab/gitlab-ce:v1.0.0