Files
searxng/container/builder.dockerfile
T

28 lines
894 B
Docker
Raw Normal View History

2025-08-07 10:46:26 +02:00
FROM ghcr.io/searxng/base:searxng-builder AS builder
COPY ./requirements*.txt ./
2025-09-14 10:36:21 +02:00
ARG TIMESTAMP="0"
RUN --mount=type=cache,id=uv,target=/root/.cache/uv set -eux; \
uv venv; \
uv pip install --no-managed-python --compile-bytecode --requirements ./requirements.txt --requirements ./requirements-server.txt; \
uv cache prune --ci; \
find ./.venv/ -exec touch -h -t $TIMESTAMP {} +
2025-08-07 10:46:26 +02:00
COPY ./searx/ ./searx/
ARG TIMESTAMP_SETTINGS="0"
RUN set -eux; \
python -m compileall -q ./searx/; \
2025-09-14 10:36:21 +02:00
touch -c -t $TIMESTAMP_SETTINGS ./searx/settings.yml; \
2025-08-07 10:46:26 +02:00
find ./searx/static/ -type f \
2025-09-14 10:36:21 +02:00
\( -name "*.html" -o -name "*.css" -o -name "*.js" -o -name "*.svg" \) \
-exec gzip -9 -k {} + \
-exec brotli -9 -k {} + \
-exec gzip --test {}.gz + \
-exec brotli --test {}.br +; \
2025-08-07 10:46:26 +02:00
# Move always changing files to /usr/local/searxng/
mv ./searx/version_frozen.py ./