Files
fingerprint-chromium/Dockerfile
T
rogee 72b5e78e26
Build and publish image / image (push) Successful in 2m13s
HH-686: associate OCI package with repository (#2)
2026-08-26 18:55:32 +08:00

71 lines
1.9 KiB
Docker

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"]