File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 15
15
# This file creates a standard build environment for building cross
16
16
# platform go binary for the architecture kubernetes cares about.
17
17
18
- FROM golang:1.4
18
+ FROM golang:1.4.2
19
19
MAINTAINER Joe Beda <
[email protected] >
20
20
21
21
ENV KUBE_CROSSPLATFORMS \
Original file line number Diff line number Diff line change @@ -415,7 +415,9 @@ function kube::build::build_image() {
415
415
kube::version::save_version_vars " ${build_context_dir} /kube-version-defs"
416
416
417
417
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'
419
421
}
420
422
421
423
# Build the kubernetes golang cross base image.
@@ -431,10 +433,12 @@ function kube::build::build_image_cross() {
431
433
# Build a docker image from a Dockerfile.
432
434
# $1 is the name of the image to build
433
435
# $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
434
437
function kube::build::docker_build() {
435
438
local -r image=$1
436
439
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} " )
438
442
439
443
kube::log::status " Building Docker image ${image} ."
440
444
local docker_output
You can’t perform that action at this time.
0 commit comments