当前位置:网站首页>harbor镜像仓库
harbor镜像仓库
2022-07-23 11:15:00 【yolo2016】
harbor镜像仓库
Harbor环境搭建
wget https://github.com/goharbor/harbor/releases/download/v2.3.4/harbor-offline-installer-v2.3.4.tgz
tar -zxvf harbor-offline-installer-v2.3.4.tgz -C /usr/local/
cp harbor.yml.tmpl harbor.yml
./install.sh

构建镜像
vi Dockerfile
FROM nginx
RUN echo "hello world, v1" > /usr/share/nginx/html/index.html
docker build --no-cache --force-rm -t web:v1 .
# docker tag SOURCE_IMAGE[:TAG] TARGET_IMAGE[:TAG]
docker tag web:v1 192.168.3.80:80/repo/web:v1
镜像上传
sudo tee /etc/docker/daemon.json <<-'EOF'
{
"exec-opts": ["native.cgroupdriver=systemd"],
"registry-mirrors": ["https://du3ia00u.mirror.aliyuncs.com"],
"live-restore": true,
"log-driver":"json-file",
"log-opts": {
"max-size":"500m", "max-file":"3"},
"storage-driver": "overlay2",
"insecure-registries": ["192.168.3.80:80"]
}
EOF
systemctl restart docker
docker login 192.168.3.80:80
docker push 192.168.3.80:80/repo/web:v1
镜像拉取并发布
# 编写docker-compose.yml
version: "3"
services:
web:
image: 192.168.3.80:80/repo/web:v1
container_name: web
ports:
- 6000:80
docker-compose up -d
测试验证

边栏推荐
- airserver在哪里下载?使用方法教程
- VSCode 更新後與tab相關快捷鍵無法使用
- Part III detailed explanation of RBAC authority management database design
- PHP代码审计4—Sql注入漏洞
- After vscode is updated, the shortcut keys related to tab cannot be used
- [200 opencv routines] 225. Fourier descriptor for feature extraction
- day1
- Chapter 4 event handling of quick mastering QML
- OPNsense – 多功能高可靠易使用的防火墙(二)
- RTA is a new way to accurately launch advertisements?
猜你喜欢
随机推荐
C语言经典例题-switch case语句转换日期格式
[machine learning basics] unsupervised learning (5) -- generation model
工业物联网中的时序数据
[hiflow] regularly send Tencent cloud SMS sending group
Cookie和Session的区别
MySQL execution order
bgp选路原则
Axure advanced
Quickly master QML Chapter 5 components
可穿戴设备的自电容触摸控制器IT7259Q-13,IT7259EX-24
VSCode 更新后与tab相关快捷键无法使用
对C语言最基本的代码解释
it 农民工的现状和历史
第五篇 Druid数据源介绍
(BFS) template + example (maze, eight digits)
ClickHouse,让查询飞起来!!!
Redis中 LRU和LFU的淘汰策略区别
IDEA 提高效率的5大免费插件
(BFS)模板+例题(走迷宫,八数码)
STL map属性









