重新安装gitlab
docker安装gitlab
vim docker-compose.yaml
version: "3.6"
services:
gitlab:
container_name: gitlab
image: gitlab/gitlab-ce:latest
restart: always
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'http:192.168.0.36:8083'
ports:
- "1222:22"
- "8083:8083" ##8083为容器端口,由 external_url地址决定,建议三者相同!!!
- "443:443"
volumes:
- /srv/gitlab/data:/var/opt/gitlab
- /srv/gitlab/logs:/var/log/gitlab
- /srv/gitlab/config:/etc/gitlab
运行
docker-compose up -d
可写入脚本执行
vim gitlab.sh
#!/bin/bash
docker rm -f gitlab
#rm 删除gitlab的配置文件
docker-compose up -d
bash gitlab.sh
!!!这次的博客写的实在有点纠结,欢迎大家评论