docker部署gitlab-jenkins-nexus

gitlab

拉取镜像

docker pull docker.m.daocloud.io/gitlab/gitlab-ce:latest

创建挂载目录

mkdir gitlab
cd gitlab
mkdir -p data/log
mkdir -p data/opt
mkdir -p data/etc

启动容器

docker run -itd -p 8443:443 -p 8090:80 -p 8022:22 --name gitlab -v $PWD/data/etc:/etc/gitlab -v $PWD/data/log:/var/log/gitlab -v $PWD/data/opt:/var/opt/gitlab --privileged=true docker.m.daocloud.io/gitlab/gitlab-ce:latest

查找初始账户密码

cd gitlab/data/etc
cat 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: Vk48/TVa0znqQGJX9v6cd1N9pnuone397PKcW7QnWWU=

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

修改配置gitlab/data/etc/gitlab.rb

external_url 'http://119.45.132.177'
gitlab_rails['gitlab_ssh_host'] = '119.45.132.177'
gitlab_rails['gitlab_shell_ssh_port'] = 8022
#备份相关,路径、权限、保留时间
gitlab_rails['manage_backup_path'] = true             
gitlab_rails['backup_path'] = "/var/opt/gitlab/backups"       
gitlab_rails['backup_archive_permissions'] = 0644      
gitlab_rails['backup_keep_time'] = 5184000 

使配置生效

docker exec -it gitlab bash
gitlab-ctl reconfigure
exit
docker restart gitlab

浏览器登录

输入密码:Vk48/TVa0znqQGJX9v6cd1N9pnuone397PKcW7QnWWU=

修改密码

jenkins

posted @   邹姣姣  阅读(75)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· winform 绘制太阳,地球,月球 运作规律
· AI与.NET技术实操系列(五):向量存储与相似性搜索在 .NET 中的实现
· 超详细:普通电脑也行Windows部署deepseek R1训练数据并当服务器共享给他人
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 上周热点回顾(3.3-3.9)
历史上的今天:
2021-08-19 kubernetes 证书过期
点击右上角即可分享
微信分享提示