Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b642f54

Browse files
committed
Merge pull request kubernetes#19948 from alex-mohr/automated-cherry-pick-of-#19847-upstream-release-1.0
Automated cherry pick of kubernetes#19847
2 parents 7ddd29d + 8d01e54 commit b642f54

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

build/build-image/cross/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# This file creates a standard build environment for building cross
1616
# platform go binary for the architecture kubernetes cares about.
1717

18-
FROM golang:1.4
18+
FROM golang:1.4.2
1919
MAINTAINER Joe Beda <[email protected]>
2020

2121
ENV KUBE_CROSSPLATFORMS \

build/common.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,9 @@ function kube::build::build_image() {
415415
kube::version::save_version_vars "${build_context_dir}/kube-version-defs"
416416

417417
cp build/build-image/Dockerfile ${build_context_dir}/Dockerfile
418-
kube::build::docker_build "${KUBE_BUILD_IMAGE}" "${build_context_dir}"
418+
# We don't want to force-pull this image because it's based on a local image
419+
# (see kube::build::build_image_cross), not upstream.
420+
kube::build::docker_build "${KUBE_BUILD_IMAGE}" "${build_context_dir}" 'false'
419421
}
420422

421423
# Build the kubernetes golang cross base image.
@@ -431,10 +433,12 @@ function kube::build::build_image_cross() {
431433
# Build a docker image from a Dockerfile.
432434
# $1 is the name of the image to build
433435
# $2 is the location of the "context" directory, with the Dockerfile at the root.
436+
# $3 is the value to set the --pull flag for docker build; true by default
434437
function kube::build::docker_build() {
435438
local -r image=$1
436439
local -r context_dir=$2
437-
local -ra build_cmd=("${DOCKER[@]}" build -t "${image}" "${context_dir}")
440+
local -r pull="${3:-true}"
441+
local -ra build_cmd=("${DOCKER[@]}" build -t "${image}" "--pull=${pull}" "${context_dir}")
438442

439443
kube::log::status "Building Docker image ${image}."
440444
local docker_output

0 commit comments

Comments
 (0)