Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions node-playwright-camoufox/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
ARG NODE_VERSION=

# Use trixie to be consistent across node versions.
FROM node:${NODE_VERSION}-trixie-slim

Check warning on line 5 in node-playwright-camoufox/Dockerfile

View workflow job for this annotation

GitHub Actions / img: node-playwright-camoufox node: 22, apify: ^3.7.2, crawlee: ^3.18.1, pw: 1.60.0, cf: ^0.12.0, is-latest: true

Default value for global ARG results in an empty or invalid base image name

InvalidDefaultArgInFrom: Default value for ARG node:${NODE_VERSION}-trixie-slim results in empty or invalid base image name More info: https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/

Check warning on line 5 in node-playwright-camoufox/Dockerfile

View workflow job for this annotation

GitHub Actions / img: node-playwright-camoufox node: 22, apify: ^3.7.2, crawlee: ^3.18.1, pw: 1.60.0, cf: ^0.12.0, is-latest: true

Default value for global ARG results in an empty or invalid base image name

InvalidDefaultArgInFrom: Default value for ARG node:${NODE_VERSION}-trixie-slim results in empty or invalid base image name More info: https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/

Check warning on line 5 in node-playwright-camoufox/Dockerfile

View workflow job for this annotation

GitHub Actions / img: node-playwright-camoufox node: 24, apify: ^3.7.2, crawlee: ^3.18.1, pw: 1.60.0, cf: ^0.12.0, is-latest: true

Default value for global ARG results in an empty or invalid base image name

InvalidDefaultArgInFrom: Default value for ARG node:${NODE_VERSION}-trixie-slim results in empty or invalid base image name More info: https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/

Check warning on line 5 in node-playwright-camoufox/Dockerfile

View workflow job for this annotation

GitHub Actions / img: node-playwright-camoufox node: 24, apify: ^3.7.2, crawlee: ^3.18.1, pw: 1.60.0, cf: ^0.12.0, is-latest: true

Default value for global ARG results in an empty or invalid base image name

InvalidDefaultArgInFrom: Default value for ARG node:${NODE_VERSION}-trixie-slim results in empty or invalid base image name More info: https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/

Check warning on line 5 in node-playwright-camoufox/Dockerfile

View workflow job for this annotation

GitHub Actions / img: node-playwright-camoufox node: 26, apify: ^3.7.2, crawlee: ^3.18.1, pw: 1.60.0, cf: ^0.12.0, is-latest: true

Default value for global ARG results in an empty or invalid base image name

InvalidDefaultArgInFrom: Default value for ARG node:${NODE_VERSION}-trixie-slim results in empty or invalid base image name More info: https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/

Check warning on line 5 in node-playwright-camoufox/Dockerfile

View workflow job for this annotation

GitHub Actions / img: node-playwright-camoufox node: 26, apify: ^3.7.2, crawlee: ^3.18.1, pw: 1.60.0, cf: ^0.12.0, is-latest: true

Default value for global ARG results in an empty or invalid base image name

InvalidDefaultArgInFrom: Default value for ARG node:${NODE_VERSION}-trixie-slim results in empty or invalid base image name More info: https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/

# Playwright version is passed in the format `v1.57.0-` (matching the tag
# format used by the full node-playwright image). Stripped below before
Expand All @@ -26,8 +26,8 @@
# Tell the crawlee cli that we already have browsers installed, so it skips installing them
ENV CRAWLEE_SKIP_BROWSER_INSTALL=1

# Camoufox stores its browser in ~/.cache/camoufox
ENV APIFY_DEFAULT_BROWSER_PATH=/home/myuser/.cache/camoufox/camoufox-bin
# Stable path through a symlink to the installed Camoufox directory.
ENV APIFY_DEFAULT_BROWSER_PATH=/home/myuser/.cache/camoufox-current/camoufox-bin

# Prevent installing of browsers by future `npm install`.
ENV PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1
Expand Down Expand Up @@ -139,9 +139,12 @@
\
# Install Camoufox browser
&& PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=0 npx camoufox-js fetch \
# Overrides the dynamic library used by Firefox to determine trusted root certificates with p11-kit-trust.so, which loads the system certificates.
&& rm -f /home/myuser/.cache/camoufox/libnssckbi.so \
&& ln -s $(ls -d /usr/lib/*-linux-gnu)/pkcs11/p11-kit-trust.so /home/myuser/.cache/camoufox/libnssckbi.so \
# Resolve both flat and versioned Camoufox cache layouts.
&& CAMOUFOX_BINARY="$(find /home/myuser/.cache/camoufox -type f -name camoufox-bin)" \
&& test -x "$CAMOUFOX_BINARY" \
&& ln -s "$(dirname "$CAMOUFOX_BINARY")" "$(dirname "$APIFY_DEFAULT_BROWSER_PATH")" \
# Load system certificates from the browser's own library directory.
&& ln -sf "$(ls -d /usr/lib/*-linux-gnu)/pkcs11/p11-kit-trust.so" "$(dirname "$CAMOUFOX_BINARY")/libnssckbi.so" \
\
&& npm install --omit=dev --omit=optional --no-package-lock --prefer-online \
&& npm install --no-package-lock --prefer-online --no-save impit@latest \
Expand Down
13 changes: 8 additions & 5 deletions python-playwright-camoufox/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
ARG PYTHON_VERSION=

# Use trixie-slim to be consistent across python versions
FROM --platform=linux/amd64 python:${PYTHON_VERSION}-slim-trixie

Check warning on line 5 in python-playwright-camoufox/Dockerfile

View workflow job for this annotation

GitHub Actions / img: python-playwright-camoufox py: 3.11, pw: 1.62.0, cf: 0.5.6, is-latest: true

FROM --platform flag should not use a constant value

FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/amd64" More info: https://docs.docker.com/go/dockerfile/rule/from-platform-flag-const-disallowed/

Check warning on line 5 in python-playwright-camoufox/Dockerfile

View workflow job for this annotation

GitHub Actions / img: python-playwright-camoufox py: 3.11, pw: 1.62.0, cf: 0.5.6, is-latest: true

Default value for global ARG results in an empty or invalid base image name

InvalidDefaultArgInFrom: Default value for ARG python:${PYTHON_VERSION}-slim-trixie results in empty or invalid base image name More info: https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/

Check warning on line 5 in python-playwright-camoufox/Dockerfile

View workflow job for this annotation

GitHub Actions / img: python-playwright-camoufox py: 3.13, pw: 1.62.0, cf: 0.5.6, is-latest: true

FROM --platform flag should not use a constant value

FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/amd64" More info: https://docs.docker.com/go/dockerfile/rule/from-platform-flag-const-disallowed/

Check warning on line 5 in python-playwright-camoufox/Dockerfile

View workflow job for this annotation

GitHub Actions / img: python-playwright-camoufox py: 3.13, pw: 1.62.0, cf: 0.5.6, is-latest: true

Default value for global ARG results in an empty or invalid base image name

InvalidDefaultArgInFrom: Default value for ARG python:${PYTHON_VERSION}-slim-trixie results in empty or invalid base image name More info: https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/

Check warning on line 5 in python-playwright-camoufox/Dockerfile

View workflow job for this annotation

GitHub Actions / img: python-playwright-camoufox py: 3.10, pw: 1.62.0, cf: 0.5.6, is-latest: true

FROM --platform flag should not use a constant value

FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/amd64" More info: https://docs.docker.com/go/dockerfile/rule/from-platform-flag-const-disallowed/

Check warning on line 5 in python-playwright-camoufox/Dockerfile

View workflow job for this annotation

GitHub Actions / img: python-playwright-camoufox py: 3.10, pw: 1.62.0, cf: 0.5.6, is-latest: true

Default value for global ARG results in an empty or invalid base image name

InvalidDefaultArgInFrom: Default value for ARG python:${PYTHON_VERSION}-slim-trixie results in empty or invalid base image name More info: https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/

Check warning on line 5 in python-playwright-camoufox/Dockerfile

View workflow job for this annotation

GitHub Actions / img: python-playwright-camoufox py: 3.12, pw: 1.62.0, cf: 0.5.6, is-latest: true

FROM --platform flag should not use a constant value

FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/amd64" More info: https://docs.docker.com/go/dockerfile/rule/from-platform-flag-const-disallowed/

Check warning on line 5 in python-playwright-camoufox/Dockerfile

View workflow job for this annotation

GitHub Actions / img: python-playwright-camoufox py: 3.12, pw: 1.62.0, cf: 0.5.6, is-latest: true

Default value for global ARG results in an empty or invalid base image name

InvalidDefaultArgInFrom: Default value for ARG python:${PYTHON_VERSION}-slim-trixie results in empty or invalid base image name More info: https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/

Check warning on line 5 in python-playwright-camoufox/Dockerfile

View workflow job for this annotation

GitHub Actions / img: python-playwright-camoufox py: 3.14, pw: 1.62.0, cf: 0.5.6, is-latest: true

FROM --platform flag should not use a constant value

FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/amd64" More info: https://docs.docker.com/go/dockerfile/rule/from-platform-flag-const-disallowed/

Check warning on line 5 in python-playwright-camoufox/Dockerfile

View workflow job for this annotation

GitHub Actions / img: python-playwright-camoufox py: 3.14, pw: 1.62.0, cf: 0.5.6, is-latest: true

Default value for global ARG results in an empty or invalid base image name

InvalidDefaultArgInFrom: Default value for ARG python:${PYTHON_VERSION}-slim-trixie results in empty or invalid base image name More info: https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/

# Add labels to the image to identify it as an Apify Actor
LABEL maintainer="support@apify.com" \
Expand Down Expand Up @@ -46,8 +46,8 @@
# Prevent playwright from downloading browsers when users install playwright via pip
ENV PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1

# Camoufox stores its browser in ~/.cache/camoufox
ENV APIFY_DEFAULT_BROWSER_PATH=/root/.cache/camoufox/camoufox-bin
# Stable path through a symlink to the installed Camoufox directory.
ENV APIFY_DEFAULT_BROWSER_PATH=/root/.cache/camoufox-current/camoufox-bin

# Copy the script for registering intermediate certificates and the pre-downloaded certificates
COPY ./register_intermediate_certs.sh ./register_intermediate_certs.sh
Expand Down Expand Up @@ -111,9 +111,12 @@
camoufox[geoip]~=${CAMOUFOX_VERSION} \
# Fetch the Camoufox browser
&& python -m camoufox fetch \
# Overrides the dynamic library used by Firefox to determine trusted root certificates with p11-kit-trust.so, which loads the system certificates.
&& rm -f /root/.cache/camoufox/libnssckbi.so \
&& ln -s /usr/lib/x86_64-linux-gnu/pkcs11/p11-kit-trust.so /root/.cache/camoufox/libnssckbi.so
# Resolve both flat and versioned Camoufox cache layouts.
&& CAMOUFOX_BINARY="$(find /root/.cache/camoufox -type f -name camoufox-bin)" \
&& test -x "$CAMOUFOX_BINARY" \
&& ln -s "$(dirname "$CAMOUFOX_BINARY")" "$(dirname "$APIFY_DEFAULT_BROWSER_PATH")" \
# Load system certificates from the browser's own library directory.
&& ln -sf "$(ls -d /usr/lib/*-linux-gnu)/pkcs11/p11-kit-trust.so" "$(dirname "$CAMOUFOX_BINARY")/libnssckbi.so"

# Copy the dummy source code to the image
COPY --chown=myuser:myuser . .
Expand Down
Loading