summaryrefslogtreecommitdiff
path: root/container/builder.dockerfile
diff options
context:
space:
mode:
Diffstat (limited to 'container/builder.dockerfile')
-rw-r--r--container/builder.dockerfile23
1 files changed, 13 insertions, 10 deletions
diff --git a/container/builder.dockerfile b/container/builder.dockerfile
index dc2279dd9..99b22fcc2 100644
--- a/container/builder.dockerfile
+++ b/container/builder.dockerfile
@@ -2,10 +2,13 @@ FROM ghcr.io/searxng/base:searxng-builder AS builder
COPY ./requirements*.txt ./
-RUN --mount=type=cache,id=pip,target=/root/.cache/pip set -eux; \
- python -m venv ./.venv/; \
- . ./.venv/bin/activate; \
- pip install -r ./requirements.txt -r ./requirements-server.txt
+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 {} +
COPY ./searx/ ./searx/
@@ -13,12 +16,12 @@ ARG TIMESTAMP_SETTINGS="0"
RUN set -eux; \
python -m compileall -q ./searx/; \
- touch -c --date=@$TIMESTAMP_SETTINGS ./searx/settings.yml; \
+ touch -c -t $TIMESTAMP_SETTINGS ./searx/settings.yml; \
find ./searx/static/ -type f \
- \( -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 +; \
+ \( -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 +; \
# Move always changing files to /usr/local/searxng/
mv ./searx/version_frozen.py ./