从零开始Ubuntu24.04上Docker构建自动化部署(四)Docker安装gitlab

你会发现所有gitlab都无法拉取到的情况下,经查找极狐下的gitlab还可以下载,具体如下:

建议保存地址:

复制代码
https://packages.gitlab.cn/#browse/search=keyword%3Dgitlab

最新版本:

sudo docker pull registry.gitlab.cn/omnibus/gitlab-jh:17.3.3

停止docker 上mygitlab

sudo docker stop mygitlab

删除docker上mygitlab容器

sudo docker rm mygitlab

修改配置需要重启

gitlab-ctl reconfigure

gitlab-ctl restart

运行gitlab

sudo docker run --detach --publish 20443:443 --publish 20080:80 --publish 20022:22 --name=mygitlab --restart=always --volume /home/gitlab/config:/etc/gitlab --volume /home/gitlab/logs:/var/log/gitlab --volume /home/gitlab/data:/var/opt/gitlab --privileged=true registry.gitlab.cn/omnibus/gitlab-jh:17.3.3

浏览器访问:

复制代码
http://192.168.100.128:20080/

查看密码

cat /etc/gitlab/initial_root_password

初始化密码,修改密码

root@c5d112cc211f:/# cat /etc/gitlab/initial_root_password

WARNING: This value is valid only in the following conditions

1. If provided manually (either via `GITLAB_ROOT_PASSWORD` environment variable or via `gitlab_rails'initial_root_password'` setting in `gitlab.rb`, it was provided before database was seeded for the first time (usually, the first 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 following https://docs.gitlab.com/ee/security/reset_user_password.html#reset-your-root-password.

Password: +NFD/uQ/IP1uB8idyV2YKq5q9AVLfAJd7jBykWU/zgI=

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

登录系统后,修改密码即可

当‌Docker在拉取镜像时卡在"‌pulling fs layer"阶段,可以通过重启Docker服务来解决。 具体步骤如下:

首先,尝试重启Docker服务。可以通过运行以下命令来重启Docker服务:

复制代码
systemctl restart docker
相关推荐
DeepVisionary7 小时前
阿里云上线旗舰多模态新模型,不公布跑分且限时14天退役
python·自动化
zixu_star10 小时前
定时任务是什么?从日常自动化到 AI 应用,软件如何自动执行任务?
运维·人工智能·自动化
QXWZ_IA15 小时前
管道GIS测绘如何实现自动化成图:三种成图方式怎么选
运维·人工智能·安全·自动化
wz975416 小时前
Docker 从 systemd 托管容器、overlay2 存储驱动到 Compose 多容器实战
spring cloud·docker·eureka
严肃小白兔16 小时前
GitHub 个人仓库正式支持结构化 Issue:从标签管理到自动化任务工作流
自动化·github·issue
新*17 小时前
ES 7.17 三节点 Docker 集群接入 IK 自定义词典:一次从丢插件到热更新的完整排障
运维·elasticsearch·docker·中文分词·ik分词
小白的码BUG之路18 小时前
Jenkins -- gitee+docker+harbor+k8s 部署项目
docker·gitee·jenkins
AlfredZhao18 小时前
Docker Compose 平滑切换环境变量文件,容器配置不残留
docker
duansamve1 天前
Python3+Flask+PostgreSQL18+Vue3项目生产环境用docker如何部署?
python·docker·flask
IT大白鼠2 天前
GitLab 未认证 RCE 应急实战CVE-2026-97229(CVSS 10.0)
网络·安全·gitlab