forked from bazelbuild/rules_k8s
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create image with bazel 4.1.0 and 3.5.0 (bazelbuild#664)
- Loading branch information
Showing
5 changed files
with
64 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,13 +14,28 @@ | |
|
||
# Ubuntu with bazel, gcloud and its dependencies preinstalled. | ||
|
||
ARG NEW_VERSION | ||
ARG OLD_VERSION | ||
FROM launcher.gcr.io/google/bazel:${OLD_VERSION} as old | ||
FROM launcher.gcr.io/google/bazel:${NEW_VERSION} | ||
FROM ubuntu:18.04 | ||
# Based off github.com/kubernetes/test-infra/images/bazelbuild | ||
LABEL maintainer="[email protected]" | ||
|
||
# See https://docs.bazel.build/versions/main/install-ubuntu.html | ||
RUN apt update \ | ||
&& apt install -y --no-install-recommends \ | ||
gnupg \ | ||
ca-certificates | ||
COPY bazel.pub.gpg bazel.list / | ||
RUN gpg -o /etc/apt/trusted.gpg.d/bazel.gpg --dearmor /bazel.pub.gpg \ | ||
&& rm /bazel.pub.gpg \ | ||
&& mv /bazel.list /etc/apt/sources.list.d/bazel.list | ||
|
||
ARG NEW_VERSION | ||
ARG OLD_VERSION | ||
RUN apt update \ | ||
&& apt install -y --no-install-recommends \ | ||
"bazel-${NEW_VERSION}" \ | ||
"bazel-${OLD_VERSION}" | ||
|
||
|
||
# See the following docs: | ||
# * https://cloud.google.com/sdk/docs/install#deb | ||
|
||
|
@@ -37,14 +52,10 @@ COPY sources.list /etc/apt/sources.list.d/google-cloud-sdk.list | |
# * kubectl: needed by rules_k8s | ||
# * pip setuptools wheel: needed by python rules | ||
# * python-pip: needed by python rules | ||
RUN apt-get update \ | ||
&& apt-get install -y --no-install-recommends \ | ||
RUN apt update \ | ||
&& apt install -y --no-install-recommends \ | ||
google-cloud-sdk \ | ||
kubectl \ | ||
python-pip \ | ||
&& apt-get clean \ | ||
&& pip install pip setuptools wheel | ||
|
||
ARG OLD_VERSION | ||
COPY --from=old \ | ||
/usr/local/lib/bazel/bin/bazel-real /usr/local/lib/bazel/bin/bazel-${OLD_VERSION} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
deb [arch=amd64] https://storage.googleapis.com/bazel-apt stable jdk1.8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters