Skip to content

Commit

Permalink
And re-tabify that (to make previous easier to review)
Browse files Browse the repository at this point in the history
  • Loading branch information
zmerlynn committed Apr 3, 2015
1 parent e57171d commit 5b6c75f
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions build/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -604,18 +604,18 @@ function kube::release::create_docker_images_for_server() {
kube::log::status "Starting Docker build for image: ${binary_name}"

(
local docker_file_path="$1/${binary_name}.Dockerfile"
local binary_file_path="$1/${binary_name}"
if [ -f ${docker_file_path} ]; then
local docker_file_path="$1/${binary_name}.Dockerfile"
local binary_file_path="$1/${binary_name}"
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}
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

Expand Down

0 comments on commit 5b6c75f

Please sign in to comment.