mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 05:57:25 +00:00
And re-tabify that (to make previous easier to review)
This commit is contained in:
parent
e57171d2cc
commit
5b6c75f986
@ -604,18 +604,18 @@ function kube::release::create_docker_images_for_server() {
|
|||||||
kube::log::status "Starting Docker build for image: ${binary_name}"
|
kube::log::status "Starting Docker build for image: ${binary_name}"
|
||||||
|
|
||||||
(
|
(
|
||||||
local docker_file_path="$1/${binary_name}.Dockerfile"
|
local docker_file_path="$1/${binary_name}.Dockerfile"
|
||||||
local binary_file_path="$1/${binary_name}"
|
local binary_file_path="$1/${binary_name}"
|
||||||
if [ -f ${docker_file_path} ]; then
|
if [ -f ${docker_file_path} ]; then
|
||||||
|
rm ${docker_file_path}
|
||||||
|
fi
|
||||||
|
printf " FROM scratch \n ADD ${binary_name} /${binary_name} \n ENTRYPOINT [ \"/${binary_name}\" ]\n" >> ${docker_file_path}
|
||||||
|
local md5_sum=$(kube::release::md5 ${binary_file_path})
|
||||||
|
local docker_image_tag=gcr.io/google_containers/$binary_name:$md5_sum
|
||||||
|
docker build -q -f "${docker_file_path}" -t "${docker_image_tag}" ${1} >/dev/null
|
||||||
|
docker save ${docker_image_tag} > ${1}/${binary_name}.tar
|
||||||
|
echo $md5_sum > ${1}/${binary_name}.docker_tag
|
||||||
rm ${docker_file_path}
|
rm ${docker_file_path}
|
||||||
fi
|
|
||||||
printf " FROM scratch \n ADD ${binary_name} /${binary_name} \n ENTRYPOINT [ \"/${binary_name}\" ]\n" >> ${docker_file_path}
|
|
||||||
local md5_sum=$(kube::release::md5 ${binary_file_path})
|
|
||||||
local docker_image_tag=gcr.io/google_containers/$binary_name:$md5_sum
|
|
||||||
docker build -q -f "${docker_file_path}" -t "${docker_image_tag}" ${1} >/dev/null
|
|
||||||
docker save ${docker_image_tag} > ${1}/${binary_name}.tar
|
|
||||||
echo $md5_sum > ${1}/${binary_name}.docker_tag
|
|
||||||
rm ${docker_file_path}
|
|
||||||
) &
|
) &
|
||||||
done
|
done
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user