mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-07 11:13:48 +00:00
Merge pull request #19847 from ihmccreery/golang
Pin golang build to 1.4.2 instead of floating on 1.4 and force pull the base golang image
This commit is contained in:
commit
74d3506b68
@ -15,7 +15,7 @@
|
|||||||
# This file creates a standard build environment for building cross
|
# This file creates a standard build environment for building cross
|
||||||
# platform go binary for the architecture kubernetes cares about.
|
# platform go binary for the architecture kubernetes cares about.
|
||||||
|
|
||||||
FROM golang:1.4
|
FROM golang:1.4.2
|
||||||
MAINTAINER Joe Beda <jbeda@google.com>
|
MAINTAINER Joe Beda <jbeda@google.com>
|
||||||
|
|
||||||
ENV KUBE_CROSSPLATFORMS \
|
ENV KUBE_CROSSPLATFORMS \
|
||||||
|
@ -480,7 +480,9 @@ function kube::build::build_image() {
|
|||||||
kube::version::save_version_vars "${build_context_dir}/kube-version-defs"
|
kube::version::save_version_vars "${build_context_dir}/kube-version-defs"
|
||||||
|
|
||||||
cp build/build-image/Dockerfile ${build_context_dir}/Dockerfile
|
cp build/build-image/Dockerfile ${build_context_dir}/Dockerfile
|
||||||
kube::build::docker_build "${KUBE_BUILD_IMAGE}" "${build_context_dir}"
|
# We don't want to force-pull this image because it's based on a local image
|
||||||
|
# (see kube::build::build_image_cross), not upstream.
|
||||||
|
kube::build::docker_build "${KUBE_BUILD_IMAGE}" "${build_context_dir}" 'false'
|
||||||
}
|
}
|
||||||
|
|
||||||
# Build the kubernetes golang cross base image.
|
# Build the kubernetes golang cross base image.
|
||||||
@ -496,10 +498,12 @@ function kube::build::build_image_cross() {
|
|||||||
# Build a docker image from a Dockerfile.
|
# Build a docker image from a Dockerfile.
|
||||||
# $1 is the name of the image to build
|
# $1 is the name of the image to build
|
||||||
# $2 is the location of the "context" directory, with the Dockerfile at the root.
|
# $2 is the location of the "context" directory, with the Dockerfile at the root.
|
||||||
|
# $3 is the value to set the --pull flag for docker build; true by default
|
||||||
function kube::build::docker_build() {
|
function kube::build::docker_build() {
|
||||||
local -r image=$1
|
local -r image=$1
|
||||||
local -r context_dir=$2
|
local -r context_dir=$2
|
||||||
local -ra build_cmd=("${DOCKER[@]}" build -t "${image}" "${context_dir}")
|
local -r pull="${3:-true}"
|
||||||
|
local -ra build_cmd=("${DOCKER[@]}" build -t "${image}" "--pull=${pull}" "${context_dir}")
|
||||||
|
|
||||||
kube::log::status "Building Docker image ${image}."
|
kube::log::status "Building Docker image ${image}."
|
||||||
local docker_output
|
local docker_output
|
||||||
|
Loading…
Reference in New Issue
Block a user