FROM ubuntu:24.04 AS download ARG CHROME_URL RUN apt-get update \ && apt-get install -y --no-install-recommends ca-certificates curl xz-utils \ && case "$CHROME_URL" in \ https://github.com/adryfish/fingerprint-chromium/releases/download/*/*-x86_64_linux.tar.xz) ;; \ *) echo "unexpected CHROME_URL: $CHROME_URL" >&2; exit 1 ;; \ esac \ && mkdir -p /opt/chromium \ && curl --fail --location --retry 3 --proto '=https' --tlsv1.2 "$CHROME_URL" \ | tar -xJ --strip-components=1 -C /opt/chromium FROM ubuntu:24.04 ARG CHROME_VERSION ARG OCI_REVISION ARG OCI_SOURCE LABEL org.opencontainers.image.revision="$OCI_REVISION" \ org.opencontainers.image.source="$OCI_SOURCE" \ org.opencontainers.image.version="$CHROME_VERSION" RUN apt-get update \ && apt-get install -y --no-install-recommends \ ca-certificates \ fonts-liberation \ fonts-noto-color-emoji \ libasound2t64 \ libatk-bridge2.0-0t64 \ libatk1.0-0t64 \ libcups2t64 \ libdbus-1-3 \ libdrm2 \ libgbm1 \ libglib2.0-0t64 \ libgtk-3-0t64 \ libnspr4 \ libnss3 \ libpango-1.0-0 \ libpangocairo-1.0-0 \ libx11-6 \ libx11-xcb1 \ libxcb1 \ libxcomposite1 \ libxdamage1 \ libxext6 \ libxfixes3 \ libxkbcommon0 \ libxrandr2 \ libxshmfence1 \ xdg-utils \ xvfb \ && rm -rf /var/lib/apt/lists/* \ && install -d -o ubuntu -g ubuntu /data RUN apt-get update \ && apt-get install -y --no-install-recommends socat \ && rm -rf /var/lib/apt/lists/* \ && install -d -m 1777 /tmp/.X11-unix COPY --from=download /opt/chromium /opt/chromium COPY --chmod=755 docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh USER ubuntu VOLUME ["/data"] EXPOSE 9222 ENTRYPOINT ["docker-entrypoint.sh"]