docker安装gitlab

安装gitlab

bash 复制代码
sudo docker run --detach \
  --hostname gitlab \
  --publish 543:443 --publish 90:80 --publish 222: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 \
  registry.gitlab.cn/omnibus/gitlab-jh:latest

端口543:暴露给https

端口90:暴露给http

端口222:暴露给ssh

获得root登录密码

bash 复制代码
docker exec -it gitlab bash
cat /etc/gitlab/initial_root_password

initial_root_password内容如下

bash 复制代码
# WARNING: This value is valid only in the following conditions
#          1. If provided manually (either via `GITLAB_ROOT_PASSWORD` environment variable or_root_password']` setting in `gitlab.rb`, it was provided before database was seeded for the rst reconfigure run).
#          2. Password hasn't been changed manually, either via UI or via command line.
#
#          If the password shown here doesn't work, you must reset the admin password followiee/security/reset_user_password.html#reset-your-root-password.

Password: JiLfbPrwhQZfjWdiggKCHEpsuvYmcM2nRe5yyboRqws=

# NOTE: This file will be automatically deleted in the first reconfigure run after 24 hours.

登录root并切换成中文

相关推荐
oMcLin1 小时前
2025年必备的Docker命令指南与实战示例
docker·容器·eureka
AtoposのCX3301 小时前
Docker运行hello-world镜像失败或超时
运维·docker
sun cat1 小时前
Docker详细介绍(6)
docker·容器·docker-compose
小Pawn爷5 小时前
4.镜像仓库
docker
江湖有缘7 小时前
零基础入门:使用 Docker 快速部署 Organizr 个人主页
java·服务器·docker
广州中轴线7 小时前
OpenStack on Kubernetes 生产部署实战(十三)
容器·kubernetes·openstack
礼拜天没时间.9 小时前
深入Docker架构——C/S模式解析
linux·docker·容器·架构·centos
猫头虎9 小时前
如何使用Docker部署OpenClaw汉化中文版?
运维·人工智能·docker·容器·langchain·开源·aigc
会周易的程序员9 小时前
openplc runtimev4 Docker 部署
运维·c++·物联网·docker·容器·软件工程·iot
小Pawn爷10 小时前
1.Docker基础
运维·docker·容器