17、Jenkins实现制作自定义镜像并推送到harbor私有镜像库中
harbor
Harbor 是一个开源的容器镜像仓库,用于存储和管理 Docker 镜像和其他容器镜像。 * 容器镜像仓库、存储和管理 Docker 镜像和其他容器镜像 * 有什么特点:支持多种镜像格式、易于使用、安全性和访问控制
项目地址:https://gitcode.com/gh_mirrors/ha/harbor

·
第一步、jenkins添加配置实现,jenkins制作自定义镜像
将构建后操作的内容删除(不再服务器通过dockerfile来自己制作镜像了)
配置shell命令(仿制我们的dockerfile,idea中都不需要docker-compose了)
再推送完代码后我们在给他打一个3的tag标签
harbor
Harbor 是一个开源的容器镜像仓库,用于存储和管理 Docker 镜像和其他容器镜像。 * 容器镜像仓库、存储和管理 Docker 镜像和其他容器镜像 * 有什么特点:支持多种镜像格式、易于使用、安全性和访问控制
项目地址:https://gitcode.com/gh_mirrors/ha/harbor
让jenkin通过dockerfile来制作镜像
mv target/* .jar docekr/
docker build -r mytest:$tag docker/
我们使用的宿主机的docekr那么我们的镜像就在宿主机的镜像中(为什么不在jenkins中安装docker使用,那么镜像下载在jenkins中,可能就会有空间大小问题了)
第二步、追加shell命令,jenkins中制作完镜像后 将镜像推动到harbor中
mv target/* .jar docekr/
docker build -r mytest:$tag docker/
docker login -u admin -p Harbor12345 192.168.11.102:80
docker tag mytest:$ tag 192.168.11.102:80/repo/mytest:$tag
docker push 192.168.11.102:80/repo/mytest:$tag
阅读全文
AI总结




Harbor 是一个开源的容器镜像仓库,用于存储和管理 Docker 镜像和其他容器镜像。 * 容器镜像仓库、存储和管理 Docker 镜像和其他容器镜像 * 有什么特点:支持多种镜像格式、易于使用、安全性和访问控制
最近提交(Master分支:6 个月前 )
45659070
Fix integration issue with UI
Signed-off-by: stonezdj <stone.zhang@broadcom.com> 24 天前
add0b600
chore(deps): bump go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp
Bumps [go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp](https://github.com/open-telemetry/opentelemetry-go) from 1.31.0 to 1.34.0.
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.31.0...v1.34.0)
---
updated-dependencies:
- dependency-name: go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 26 天前
更多推荐
相关推荐
查看更多
harbor

Harbor 是一个开源的容器镜像仓库,用于存储和管理 Docker 镜像和其他容器镜像。 * 容器镜像仓库、存储和管理 Docker 镜像和其他容器镜像 * 有什么特点:支持多种镜像格式、易于使用、安全性和访问控制
harbor

Simple and minimal personal blog theme.
harbor-helm

The helm chart to deploy Harbor
目录
所有评论(0)