mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 14:07:14 +00:00
Merge pull request #97459 from yu2003w/issue#97458
Build multiplatform images when issue `make release-images`
This commit is contained in:
commit
5932f34ac3
@ -383,7 +383,11 @@ EOF
|
||||
echo "COPY nsswitch.conf /etc/" >> "${docker_file_path}"
|
||||
fi
|
||||
|
||||
"${DOCKER[@]}" build ${docker_build_opts:+"${docker_build_opts}"} -q -t "${docker_image_tag}" "${docker_build_path}" >/dev/null
|
||||
if [[ "${arch}" == "linux/s390x" || "${arch}" == "linux/ppc64le" ]]; then
|
||||
DOCKER_CLI_EXPERIMENTAL=enabled "${DOCKER[@]}" buildx build --platform linux/"${arch}" --load ${docker_build_opts:+"${docker_build_opts}"} -q -t "${docker_image_tag}" "${docker_build_path}" >/dev/null
|
||||
else
|
||||
"${DOCKER[@]}" build ${docker_build_opts:+"${docker_build_opts}"} -q -t "${docker_image_tag}" "${docker_build_path}" >/dev/null
|
||||
fi
|
||||
# If we are building an official/alpha/beta release we want to keep
|
||||
# docker images and tag them appropriately.
|
||||
local -r release_docker_image_tag="${KUBE_DOCKER_REGISTRY-$docker_registry}/${binary_name}-${arch}:${KUBE_DOCKER_IMAGE_TAG-$docker_tag}"
|
||||
|
Loading…
Reference in New Issue
Block a user