docker安装Gitlab
docker搭建Gitlab
Linux安装gitlab

gitlab官网安装文档:https://docs.gitlab.com/ee/install/docker.html

docker地址:https://hub.docker.com/r/gitlab/gitlab-ce

系统

centos 7,运行内存起码得搞个 8G 以上

1、拉取镜像

docker pull gitlab/gitlab-ce

image

2、配置本地数据卷

image-1686303513650

export GITLAB_HOME=/srv/gitlab
export GITLAB_HOME=$HOME/gitlab

chmod +x ~/.bash_profile
~/.bash_profile

3、启动gitlab

sudo docker run --detach \
  --publish 443:443 --publish 8080:80 --publish 8022:22 \
  --name gitlab \
  --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-ce:latest

等待几分钟后。。。。

4、获取gitlab登录密码

sudo docker exec -it gitlab grep 'Password:' /etc/gitlab/initial_root_password

Password: 08SkXKD9ZglaciHypM5NzZ7xoD1hHmYRTgPqpLyKll4=

image-1686305463929

5、登录gitlab

账号root,输入上面获取到的密码: 08SkXKD9ZglaciHypM5NzZ7xoD1hHmYRTgPqpLyKll4=

image-1686305806327

再改一下密码,需要复杂一点,比如abc20230609

image-1686305949154

再设置一下中文
image-1686306358914

刷新页面

image-1686306415874