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

相关推荐
Dontla1 小时前
Docker run --add-host参数解析(在容器启动时向/etc/hosts文件中添加自定义的主机名与IP映射)(适用于临时调试或测试)
tcp/ip·docker·容器
西西小飞龙1 小时前
Docker和K8S中pod、services、container的介绍和关系
docker·容器·kubernetes
元气满满的热码式1 小时前
Docker数据卷操作实战
linux·运维·docker·云原生·容器
kngines1 小时前
【实战 ES】实战 Elasticsearch:快速上手与深度实践-1.3.1单节点安装(Docker与手动部署)
大数据·elasticsearch·docker
飞火流星0202713 小时前
docker安装etcd:docker离线安装etcd、docker在线安装etcd、etcd镜像下载、etcd配置详解、etcd常用命令、安装常见问题总结
docker·容器·etcd
you来有去14 小时前
记录一下在k3s快速创建gitlab
java·kubernetes·gitlab
magrich14 小时前
Docker usage on ubuntu
ubuntu·docker·容器
ZZDICT18 小时前
两台互通的服务器使用Docker部署一主两从MySQL8.0.35
运维·服务器·mysql·docker