Files
obsidian_note/技术探究/docker容器/docker环境搭建.md
2025-12-04 09:12:56 +08:00

38 lines
990 B
Markdown
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
docker 环境
```
1.pom/jenkinsfile/dockerfille
2.基础镜像 open jdk 公网下载
a.没有hub仓库的时候镜像上传jenkins所在主机的load  imges
b.如果存在 harbor 仓库,需要上传权限,构建后上传到 harbor里面
3.修改jenkinsfile
```
在目标主机拉取构建后的镜像 并运行
```
a、导出 images 传到目标主机目标主机load 镜像,并运行
b、在目标主机上 拉取 构建后镜像 并运行
```
二、基础镜像
```
保证能读取 openjdk 基础镜像(无论是 jenkins 主机 还是harbor 仓库
然后进行构建;对于构建的结果
1、如果不存在 harbor 仓库那么结果在jenkins 主机上,在(三)进行导出;
2、如果存在 harbor 仓库,需要上传权限,构建后上传到 harbor里面
```
三    修改 Jenkisfile
```
1、导出 images 传到目标主机目标主机load 镜像,并运行
2、在目标主机上 拉取 harbor 构建后镜像 并运行
```