diff options
| author | Ivan Gabaldon <igabaldon@inetol.net> | 2025-05-16 11:16:41 +0200 |
|---|---|---|
| committer | Ivan Gabaldon <igabaldon@inetol.net> | 2025-05-20 11:49:30 +0200 |
| commit | 749de829d5bad6a05ebe1a733a6bd942c1a386ec (patch) | |
| tree | 95c26e4fb534f8f4926a3c367a047a4dae537a29 /container/Dockerfile | |
| parent | a195f5241262c71637d29d6fe5d18792eabe5a4d (diff) | |
[mod] container: refactor entrypoint script
That entrypoint is prone to screw things up, especially with permission handling. The new script handles initialization better and fixes some issues like delayed settings update via ENVs and timestamp overwriting, also adjusts what should be copied into the container.
Related https://github.com/searxng/searxng/pull/4721#issuecomment-2850272129
Diffstat (limited to 'container/Dockerfile')
| -rw-r--r-- | container/Dockerfile | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/container/Dockerfile b/container/Dockerfile index 0c3b1b1c7..d7bc83802 100644 --- a/container/Dockerfile +++ b/container/Dockerfile @@ -10,11 +10,9 @@ RUN --mount=type=cache,id=pip,target=/root/.cache/pip python -m venv ./venv \ COPY ./searx/ ./searx/ ARG TIMESTAMP_SETTINGS="0" -ARG TIMESTAMP_UWSGI="0" RUN python -m compileall -q searx \ && touch -c --date=@$TIMESTAMP_SETTINGS ./searx/settings.yml \ - && touch -c --date=@$TIMESTAMP_UWSGI ./container/uwsgi.ini \ && find ./searx/static \ \( -name "*.html" -o -name "*.css" -o -name "*.js" -o -name "*.svg" -o -name "*.ttf" -o -name "*.eot" \) \ -type f -exec gzip -9 -k {} + -exec brotli --best {} + @@ -29,7 +27,12 @@ ARG LABEL_VCS_URL="unspecified" COPY --chown=searxng:searxng --from=builder /usr/local/searxng/venv/ ./venv/ COPY --chown=searxng:searxng --from=builder /usr/local/searxng/searx/ ./searx/ -COPY --chown=searxng:searxng ./container/ ./container/ +COPY --chown=searxng:searxng ./container/config/ ./.template/ +COPY --chown=searxng:searxng ./container/entrypoint.sh ./entrypoint.sh + +ARG TIMESTAMP_UWSGI="0" + +RUN touch -c --date=@$TIMESTAMP_UWSGI ./.template/uwsgi.ini LABEL org.opencontainers.image.authors="searxng <$GIT_URL>" \ org.opencontainers.image.created="$LABEL_DATE" \ @@ -59,4 +62,4 @@ EXPOSE 8080 HEALTHCHECK CMD wget --quiet --tries=1 --spider http://localhost:8080/healthz || exit 1 -ENTRYPOINT ["/usr/local/searxng/container/docker-entrypoint.sh"] +ENTRYPOINT ["/usr/local/searxng/entrypoint.sh"] |