seleniumhq-selenium
SUCCESS
22m 13s
History Source
SummaryIterations1Transcript15Dockerfile
Dockerfile50 lines · 1452 chars
# Base image with stable Debian/Ubuntu userland
FROM ubuntu:jammy-20260217

# Non-interactive installs
ENV DEBIAN_FRONTEND=noninteractive

# Install system prerequisites (Java, Node, build tools)
RUN apt-get update && \
    apt-get install -y --no-install-recommends \
      ca-certificates \
      curl \
      gnupg \
      lsb-release \
      unzip \
      zip \
      git \
      openjdk-17-jdk \
      build-essential \
    && rm -rf /var/lib/apt/lists/*

# Install Node.js 20.x (as configured by the repo) to match tooling
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
    apt-get update && \
    apt-get install -y --no-install-recommends nodejs \
    && rm -rf /var/lib/apt/lists/*

# Install Bazelisk ( Bazel wrapper ) for Bazel builds
RUN curl -fsSL https://github.com/bazelbuild/bazelisk/releases/download/v1.14.0/bazelisk-linux-amd64 -o /usr/local/bin/bazel && \
    chmod +x /usr/local/bin/bazel

# Set Java environment
ENV JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64
ENV PATH="$JAVA_HOME/bin:/usr/local/bin:$PATH"

# Workspace for Selenium
WORKDIR /workspace/selenium

# Copy the repository contents
COPY . .

# Entrypoint script to build on demand and run the server
COPY entrypoint.sh /workspace/selenium/entrypoint.sh
RUN chmod +x /workspace/selenium/entrypoint.sh

# Expose Selenium Grid default port
EXPOSE 4444

# Run the server using the on-demand entrypoint
CMD ["bash", "/workspace/selenium/entrypoint.sh"]