1414
1515ARG GO_VERSION
1616ARG OS_CODENAME
17- ARG OLD_BAZEL_VERSION
1817
1918# The Golang version for the builder image should always be explicitly set to
2019# the Golang version of the kubernetes/kubernetes active development branch
@@ -29,41 +28,31 @@ RUN ./compile-release-tools
2928# ## Production image
3029
3130# Includes tools used for building Kubernetes in CI
32- #
33- # NOTE: we attempt to avoid unnecessary tools and image layers while
34- # supporting kubernetes builds, kind installation, etc.
35-
36- FROM launcher.gcr.io/google/bazel:${OLD_BAZEL_VERSION} as old-bazel
3731FROM debian:${OS_CODENAME}
3832
3933# arg that specifies the image name (for debugging)
4034ARG IMAGE_ARG
41- # arg that specifies the bazel version to install
42- ARG BAZEL_VERSION
35+
36+ # arg that specifies the go version to install
4337ARG GO_VERSION
4438
4539# add envs:
4640# - so we can debug with the image name:tag
47- # - with the bazel version
4841# - adding gsutil etc. to path (where we will install them)
4942# - disabling prompts when installing gsutil etc.
5043# - hinting that we are in a docker container
5144ENV IMAGE=${IMAGE_ARG} \
52- BAZEL_VERSION=${BAZEL_VERSION} \
5345 GOPATH=/home/prow/go \
5446 PATH=/home/prow/go/bin:/usr/local/go/bin:/google-cloud-sdk/bin:${PATH} \
5547 CLOUDSDK_CORE_DISABLE_PROMPTS=1 \
5648 CONTAINER=docker
5749
5850# copy in image utility scripts
59- COPY ["images/releng/k8s-ci-builder/wrapper.sh" , \
60- "images/releng/k8s-ci-builder/create_bazel_cache_rcs.sh" , \
61- "images/releng/k8s-ci-builder/install-bazel.sh" , \
62- "/usr/local/bin/" ]
51+ COPY images/releng/k8s-ci-builder/wrapper.sh /usr/local/bin/
6352
6453# Install tools needed to:
6554# - install docker
66- # - build kubernetes (dockerized, or with bazel )
55+ # - build kubernetes (dockerized)
6756#
6857# TODO: the `sed` is a bit of a hack, look into alternatives.
6958# Why this exists: `docker service start` on debian runs a `cgroupfs_mount` method,
@@ -82,13 +71,8 @@ RUN echo "Installing Packages ..." \
8271 gnupg2 \
8372 jq \
8473 kmod \
85- libassuan-dev \
86- libbtrfs-dev \
87- libdevmapper-dev \
88- libgpgme-dev \
8974 lsb-release \
9075 mercurial \
91- openssh-client \
9276 pkg-config \
9377 procps \
9478 python \
@@ -104,9 +88,7 @@ RUN echo "Installing Packages ..." \
10488 && tar xzf "${GO_TARBALL}" -C /usr/local \
10589 && rm "${GO_TARBALL}" \
10690 && mkdir -p "${GOPATH}/bin" \
107- && echo "Installing Bazel ..." \
108- && install-bazel.sh \
109- && echo "Installing gcloud SDK, kubectl ..." \
91+ && echo "Installing gcloud SDK, kubectl ..." \
11092 && curl -fsSL https://dl.google.com/dl/cloudsdk/channels/rapid/google-cloud-sdk.tar.gz --output google-cloud-sdk.tar.gz \
11193 && tar xzf google-cloud-sdk.tar.gz -C / \
11294 && rm google-cloud-sdk.tar.gz \
@@ -116,8 +98,6 @@ RUN echo "Installing Packages ..." \
11698 --path-update=false \
11799 --usage-reporting=false \
118100 && gcloud components install kubectl \
119- && gcloud components install alpha \
120- && gcloud components install beta \
121101 && echo "Installing Docker ..." \
122102 && curl -fsSL https://download.docker.com/linux/$(. /etc/os-release; echo "$ID" )/gpg | apt-key add - \
123103 && add-apt-repository \
@@ -128,12 +108,8 @@ RUN echo "Installing Packages ..." \
128108 && rm -rf /var/lib/apt/lists/* \
129109 && sed -i 's/cgroupfs_mount$/#cgroupfs_mount\n /' /etc/init.d/docker \
130110 && echo "Ensuring Legacy Iptables ..." \
131- && update-alternatives --set iptables /usr/sbin/iptables-legacy \
132- && update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy
133-
134- ARG OLD_BAZEL_VERSION
135- COPY --from=old-bazel \
136- /usr/local/lib/bazel/bin/bazel-real /usr/local/lib/bazel/bin/bazel-${OLD_BAZEL_VERSION}
111+ && update-alternatives --set iptables /usr/sbin/iptables-legacy \
112+ && update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy
137113
138114# Copy in release tools from kubernetes/release
139115WORKDIR /
0 commit comments