当前位置: 首页 > 工具软件 > kaniko > 使用案例 >

kaniko --customPlatform参数:支持不同平台的镜像构建(如:arm等)

暨承平
2023-12-01

--customPlatform
Allows to build with another default platform than the host, similarly to docker build --platform xxx the value has to be on the form --customPlatform=linux/arm, with acceptable values listed here: GOOS/GOARCH.

It’s also possible specifying CPU variants adding it as a third parameter (like --customPlatform=linux/arm/v5). Currently CPU variants are only known to be used for the ARM architecture as listed here: GOARM

The resulting images cannot provide any metadata about CPU variant due to a limitation of the OCI-image specification.

This is not virtualization and cannot help to build an architecture not natively supported by the build host. This is used to build i386 on an amd64 Host for example, or arm32 on an arm64 host.

参考链接:
https://github.com/GoogleContainerTools/kaniko#–tarpath

 类似资料: