Compare commits

...

1 Commits

Author SHA1 Message Date
dgtlmoon
46d07dbed7 Dockerfile cache tweaks and build layer github cache re-enable 2025-10-29 19:50:03 +01:00
2 changed files with 18 additions and 16 deletions

View File

@@ -82,5 +82,5 @@ jobs:
file: ${{ matrix.dockerfile }} file: ${{ matrix.dockerfile }}
platforms: ${{ matrix.platform }} platforms: ${{ matrix.platform }}
cache-from: type=gha cache-from: type=gha
cache-to: type=gha,mode=min cache-to: type=gha,mode=max

View File

@@ -34,7 +34,7 @@ ENV OPENSSL_LIB_DIR="/usr/lib/arm-linux-gnueabihf"
ENV OPENSSL_INCLUDE_DIR="/usr/include/openssl" ENV OPENSSL_INCLUDE_DIR="/usr/include/openssl"
# Additional environment variables for cryptography Rust build # Additional environment variables for cryptography Rust build
ENV CRYPTOGRAPHY_DONT_BUILD_RUST=1 ENV CRYPTOGRAPHY_DONT_BUILD_RUST=1
RUN --mount=type=cache,target=/tmp/pip-cache \ RUN --mount=type=cache,id=pip,sharing=locked,target=/tmp/pip-cache \
pip install \ pip install \
--prefer-binary \ --prefer-binary \
--extra-index-url https://www.piwheels.org/simple \ --extra-index-url https://www.piwheels.org/simple \
@@ -43,10 +43,11 @@ RUN --mount=type=cache,target=/tmp/pip-cache \
--target=/dependencies \ --target=/dependencies \
-r /requirements.txt -r /requirements.txt
# Playwright is an alternative to Selenium # Playwright is an alternative to Selenium
# Excluded this package from requirements.txt to prevent arm/v6 and arm/v7 builds from failing # Excluded this package from requirements.txt to prevent arm/v6 and arm/v7 builds from failing
# https://github.com/dgtlmoon/changedetection.io/pull/1067 also musl/alpine (not supported) # https://github.com/dgtlmoon/changedetection.io/pull/1067 also musl/alpine (not supported)
RUN --mount=type=cache,target=/tmp/pip-cache \ RUN --mount=type=cache,id=pip,sharing=locked,target=/tmp/pip-cache \
pip install \ pip install \
--prefer-binary \ --prefer-binary \
--cache-dir=/tmp/pip-cache \ --cache-dir=/tmp/pip-cache \
@@ -54,6 +55,7 @@ RUN --mount=type=cache,target=/tmp/pip-cache \
playwright~=1.48.0 \ playwright~=1.48.0 \
|| echo "WARN: Failed to install Playwright. The application can still run, but the Playwright option will be disabled." || echo "WARN: Failed to install Playwright. The application can still run, but the Playwright option will be disabled."
# Final image stage # Final image stage
FROM python:${PYTHON_VERSION}-slim-bookworm FROM python:${PYTHON_VERSION}-slim-bookworm
LABEL org.opencontainers.image.source="https://github.com/dgtlmoon/changedetection.io" LABEL org.opencontainers.image.source="https://github.com/dgtlmoon/changedetection.io"