1212#
1313# Run the following command from the root of the CEL repository:
1414#
15- # gcloud builds submit --region=us -t gcr.io/cel-analysis/gcc9 .
15+ # gcloud builds submit --region=us -t gcr.io/cel-analysis/cel-cpp/ubuntu_floor .
1616#
1717# Once complete get the sha256 digest from the output using the following
1818# command:
1919#
20- # gcloud artifacts versions list --package=gcc9 --repository=gcr.io \
20+ # gcloud artifacts versions list --package=cel-cpp/ubuntu_floor --repository=gcr.io \
2121# --location=us
2222#
2323# The cloudbuild.yaml file must be updated to use the new digest like so:
2424#
25- # - name: 'gcr.io/cel-analysis/gcc9 @<SHA256>'
26- FROM gcc:9
25+ # - name: 'gcr.io/cel-analysis/cel-cpp/ubuntu_floor @<SHA256>'
26+ FROM gcr.io/cloud-marketplace/google/ubuntu2204:latest
2727
2828# Install Bazel prerequesites and required tools.
2929# See https://docs.bazel.build/versions/master/install-ubuntu.html
30- RUN apt-get update && \
31- apt-get upgrade -y && \
32- apt-get install -y --no-install-recommends \
33- ca-certificates \
30+ RUN apt-get update && apt-get upgrade -y && \
31+ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
32+ bash \
33+ ca-certificates \
3434 git \
3535 libssl-dev \
3636 make \
@@ -41,16 +41,29 @@ RUN apt-get update && \
4141 zip \
4242 zlib1g-dev \
4343 default-jdk-headless \
44- clang-11 && \
45- apt-get clean
44+ clang-11 \
45+ gcc-9 g++-9 \
46+ tzdata \
47+ && apt-get clean
4648
47- # Install Bazel.
48- # https://github.com/bazelbuild/bazel/releases
49- ARG BAZEL_VERSION="7.3.2"
50- ADD https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-installer-linux-x86_64.sh /tmp/install_bazel.sh
51- RUN /bin/bash /tmp/install_bazel.sh && rm /tmp/install_bazel.sh
49+ # Install Bazelisk.
50+ # https://github.com/bazelbuild/bazelisk/releases
51+ ARG BAZELISK_URL="https://github.com/bazelbuild/bazelisk/releases/download/v1.27.0/bazelisk-amd64.deb"
52+ ARG BAZELISK_CHKSUM="d8b00ea975c823e15263c80200ac42979e17368547fbff4ab177af035badfa83"
53+ ADD ${BAZELISK_URL} /tmp/bazelisk.deb
54+
55+ ENV BAZELISK_CHKSUM=${BAZELISK_CHKSUM}
56+ RUN echo "${BAZELISK_CHKSUM} */tmp/bazelisk.deb" | sha256sum --check
57+
58+ RUN apt-get install /tmp/bazelisk.deb
5259
5360RUN mkdir -p /workspace
5461RUN mkdir -p /bazel
5562
56- ENTRYPOINT ["/usr/local/bin/bazel" ]
63+ RUN USE_BAZEL_VERSION=8.7.0 bazelisk help
64+ RUN USE_BAZEL_VERSION=7.3.2 bazelisk help
65+
66+ ENV CC=gcc-9
67+ ENV CXX=g++-9
68+
69+ ENTRYPOINT ["/usr/bin/bazelisk" ]
0 commit comments