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并切换成中文

相关推荐
duansamve13 小时前
Python3+Flask+PostgreSQL18+Vue3项目生产环境用docker如何部署?
python·docker·flask
mengge.cloud14 小时前
prometheus+k8s+弹性伸缩,综合项目
云原生·容器·kubernetes·prometheus
IT大白鼠18 小时前
GitLab 未认证 RCE 应急实战CVE-2026-97229(CVSS 10.0)
网络·安全·gitlab
xbzb19 小时前
从零容器化部署 ECShop:Harbor 私有仓库 + 自定义 PHP 镜像 + LNMP 三容器
容器·php·harbor·镜像·仓库·ecshop
那明眸似水19 小时前
云原生项目三:Docker秒级启动NextCloud个人网盘存储办公系统
linux·运维·docker·云原生·容器
腾飞开源20 小时前
03_Kubernetes 核心概念拆解:从 Spec/Status 收敛到工作负载控制器的设计逻辑
云原生·容器·kubernetes
知已难寻1 天前
Docker 入门:容器技术与 Docker 基础
java·运维·服务器·docker·云原生·容器
xbzb1 天前
镜像到底存在哪:/var/lib/docker 的四级映射与 daemon.json 配置
docker·容器·json·镜像·daemon.json·四级
方便面不加香菜2 天前
Docker Volume -- 管理卷Volume详解
运维·docker·容器
江湖有缘2 天前
Docker实战 | 使用Docker部署lemonitor镜像站点列表程序
运维·docker·容器