FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -y --no-install-recommends \
curl ca-certificates gnupg \
openjdk-11-jdk python3 python3-venv python3-pip \
nodejs npm \
build-essential zip unzip \
&& rm -rf /var/lib/apt/lists/*
# Bazelisk (a Bazel wrapper) to fetch the right Bazel version for the project
RUN curl -fsSL -o /usr/local/bin/bazelisk https://github.com/bazelbuild/bazelisk/releases/download/v1.19.0/bazelisk-linux-amd64 && \
chmod +x /usr/local/bin/bazelisk
# Ensure workspace directory exists
RUN mkdir -p /workspace
WORKDIR /workspace
# Copy the repository into the image
COPY . /workspace
# Ensure Node.js and Java are available (sanity checks)
RUN node --version && npm --version
RUN bazelisk version
# Build all targets as a best-effort to produce artifacts from source
RUN bazelisk build //... || true
# Default to an interactive shell so the container can be explored or extended
CMD ["/bin/bash"]