Split the setcap image from the base images, make them easier to override

This commit is contained in:
Jake Sanders
2021-02-24 11:04:34 -08:00
parent 8f15f7cf5e
commit 4b83c760a9
5 changed files with 33 additions and 20 deletions

View File

@@ -361,7 +361,7 @@ function kube::release::create_docker_images_for_server() {
for wrappable in $binaries; do
local binary_name=${wrappable%%,*}
local base_image_name=${wrappable##*,}
local base_image=${wrappable##*,}
local binary_file_path="${binary_dir}/${binary_name}"
local docker_build_path="${binary_file_path}.dockerbuild"
local docker_image_tag="${docker_registry}/${binary_name}-${arch}:${docker_tag}"
@@ -384,8 +384,8 @@ function kube::release::create_docker_images_for_server() {
--platform linux/"${arch}" \
--load ${docker_build_opts:+"${docker_build_opts}"} \
-t "${docker_image_tag}" \
--build-arg BASE_IMAGE_REGISTRY="${KUBE_BASE_IMAGE_REGISTRY}" \
--build-arg BASE_IMAGE_NAME="${base_image_name}" \
--build-arg BASEIMAGE="${base_image}" \
--build-arg SETCAP_IMAGE="${KUBE_BUILD_SETCAP_IMAGE}" \
--build-arg BINARY="${binary_name}" \
"${docker_build_path}" >"${build_log}" 2>&1; then
cat "${build_log}"