33 lines
2.0 KiB
Docker
33 lines
2.0 KiB
Docker
FROM debian:bookworm-slim@sha256:88200866dfff7ea7f5cbcb6ec7c8a701889efe6fe859fe64d6990e4b07ea4171
|
|
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
ca-certificates curl git unzip zip xz-utils zstd libstdc++6 \
|
|
file procps openssh-client rsync python3 libfreetype6 fontconfig \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
COPY jdk.properties /tmp/jdk.properties
|
|
RUN . /tmp/jdk.properties \
|
|
&& curl -fL "$JDK_URL" -o /tmp/jdk.tar.gz \
|
|
&& echo "$JDK_SHA256 /tmp/jdk.tar.gz" | sha256sum -c - \
|
|
&& mkdir -p /opt/jdk25 \
|
|
&& tar -xzf /tmp/jdk.tar.gz -C /opt/jdk25 --strip-components=1 \
|
|
&& rm /tmp/jdk.tar.gz /tmp/jdk.properties
|
|
ENV JAVA_HOME=/opt/jdk25
|
|
ENV PATH=/opt/jdk25/bin:$PATH
|
|
# Pin both the Java driver resources and its bundled Linux Node runtime.
|
|
ENV PLAYWRIGHT_BROWSERS_PATH=/opt/playwright-browsers
|
|
COPY playwright.properties /tmp/playwright.properties
|
|
RUN . /tmp/playwright.properties \
|
|
&& curl -fL "https://repo.maven.apache.org/maven2/com/microsoft/playwright/driver/$PLAYWRIGHT_VERSION/driver-$PLAYWRIGHT_VERSION.jar" -o /tmp/playwright-driver.jar \
|
|
&& curl -fL "https://repo.maven.apache.org/maven2/com/microsoft/playwright/driver-bundle/$PLAYWRIGHT_VERSION/driver-bundle-$PLAYWRIGHT_VERSION.jar" -o /tmp/playwright-bundle.jar \
|
|
&& echo "$PLAYWRIGHT_DRIVER_SHA256 /tmp/playwright-driver.jar" | sha256sum -c - \
|
|
&& echo "$PLAYWRIGHT_BUNDLE_SHA256 /tmp/playwright-bundle.jar" | sha256sum -c - \
|
|
&& unzip -q /tmp/playwright-driver.jar 'driver/package/*' -d /tmp/playwright \
|
|
&& unzip -q /tmp/playwright-bundle.jar 'driver/linux/*' -d /tmp/playwright \
|
|
&& chmod +x /tmp/playwright/driver/linux/node \
|
|
&& /tmp/playwright/driver/linux/node /tmp/playwright/driver/package/cli.js install --with-deps chromium firefox \
|
|
&& chmod -R a+rX /opt/playwright-browsers \
|
|
&& rm -rf /tmp/playwright /tmp/playwright-driver.jar /tmp/playwright-bundle.jar /tmp/playwright.properties /var/lib/apt/lists/*
|
|
WORKDIR /workspace
|
|
CMD ["bash"]
|