5.6. 将安全执行镜像上传到容器 registry
您可以使用自定义安全执行镜像或 IBM® Hyper Protect Confidential Container (HPCC)镜像在 IBM Z 和 IBM LinuxONE 裸机服务器上部署机密容器。
您必须构建安全执行镜像,创建 Dockerfile 并将其推送到容器 registry。
流程
- 构建安全执行镜像。
为安全执行镜像创建
Dockerfile文件:FROM alpine:3.20 RUN mkdir -p /images COPY ./<image_name> /images/<image_name> RUN chmod 644 /images/<image_name>
FROM alpine:3.20 RUN mkdir -p /images COPY ./<image_name> /images/<image_name> RUN chmod 644 /images/<image_name>Copy to Clipboard Copied! Toggle word wrap Toggle overflow <image_name>-
指定自定义安全执行镜像名称。例如,
se.img。
使用
Dockerfile中的自定义标签构建容器镜像:docker build -t <registry_name>/<user_name>/kata-se-artifacts:<image_tag> .
$ docker build -t <registry_name>/<user_name>/kata-se-artifacts:<image_tag> .Copy to Clipboard Copied! Toggle word wrap Toggle overflow 将容器镜像推送到 registry:
docker push <registry_name>/<user_name>/kata-se-artifacts:<image_tag>
$ docker push <registry_name>/<user_name>/kata-se-artifacts:<image_tag>Copy to Clipboard Copied! Toggle word wrap Toggle overflow