ubuntu安装docker&gitlab

#更换阿里云进行配置GPG 密钥

curl -fsSL https://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add -

sudo add-apt-repository \

"deb [arch=arm64] https://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable"

#如果出现错误:

【Linux 配置】E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

则修改下DNS

sudo echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf > /dev/null

可换的DNS有:

114公共DNS: 114.114.114.114和114.114.115.115

阿里的DNS: 223.5.5.5和223.6.6.6、

腾讯的DNS: 119.29.29.29和182.254.116.116

百度的DNS: 180.76.76.76

Google的DNS: 8.8.8.8和8.8.4.4

测试是否修改成功:

cat /etc/resolv.conf

重新更新

sudo apt-get update --fix-missing

#安装 Docker

sudo apt-get update

sudo apt install docker-ce docker-ce-cli containerd.io

docker --version

sudo systemctl status docker

#ubuntu安装gitlab

#1.更新系统的包索引

sudo apt-update

#2.安装依赖项:

sudo apt-get install -y curl openssh-server ca-certificates

#3.添加GitLab官方仓库:

curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.deb.sh | sudo bash

#安装GitLab:

sudo EXTERNAL_URL="http://your-domain.com" apt-get install gitlab-ee

(替换 your-domain.com 为你的GitLab服务器的域名/IP)

#安装完成后,GitLab 会自动配置,你可以通过 http://your-domain.com 访问GitLab的界面

备注:

修改配置文件中的端口设置

找到GitLab的配置文件gitlab.rb,通常位于/etc/gitlab/目录下

修改端口(8888为自己的端口)

external_url 'http://yourdomain.com:8888'

重新配置GitLab并重启服务

sudo gitlab-ctl reconfigure

sudo gitlab-ctl restart

确认端口更改

sudo netstat -tulnp | grep :8888

#查看root默认密码

sudo cat /etc/gitlab/initial_root_password

相关推荐
fetasty9 小时前
rustfs加picgo图床搭建
docker
蝎子莱莱爱打怪1 天前
GitLab CI/CD + Docker Registry + K8s 部署完整实战指南
后端·docker·kubernetes
小p2 天前
docker学习7:docker 容器的通信方式
docker
小p2 天前
docker学习5:提升Dockerfile水平的5个技巧
docker
小p2 天前
docker学习3:docker是怎么实现的?
docker
小p3 天前
docker学习: 2. 构建镜像Dockerfile
docker
小p4 天前
docker学习: 1. docker基本使用
docker
崔小汤呀4 天前
Docker部署Nacos
docker·容器
缓解AI焦虑4 天前
Docker + K8s 部署大模型推理服务:资源划分与多实例调度
docker·容器
1candobetter5 天前
Docker Compose Build 与 Up 的区别:什么时候必须重建镜像
docker·容器·eureka