从零开始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
相关推荐
江池俊2 小时前
解锁无限创意:Tldraw+cpolar如何通过内网穿透技术打破空间限制
docker
Honeysea_702 小时前
容器的定义及工作原理
人工智能·深度学习·机器学习·docker·ai·持续部署
2418ly2 小时前
docker常用命令
运维·docker·容器
yuxb732 小时前
Docker学习笔记(三):镜像与容器管理进阶操作
笔记·学习·docker
明月(Alioo)3 小时前
机器学习入门,用Lima在macOS免费搭建Docker环境,彻底解决镜像与收费难题!
macos·docker·容器
双翌视觉3 小时前
智能相机还是视觉系统?一文讲透工业视觉两大选择的取舍之道
科技·数码相机·自动化·机器视觉
叫我阿柒啊5 小时前
从Java全栈到云原生:一场技术深度对话
java·spring boot·docker·微服务·typescript·消息队列·vue3
静若繁花_jingjing5 小时前
云原生部署_Docker入门
docker·云原生·容器
于齐龙5 小时前
关于kubernetes和docker版本的一些总结
docker·容器·kubernetes
敲上瘾7 小时前
Docker 容器核心指令与数据库容器化实践
linux·运维·服务器·docker·容器·eureka·dubbo