Motore di metasearch che rispetta la privacy, hackerabile / pronuncia səːks. https://devol.it/it/searx
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

94 lines
2.9 KiB

  1. FROM alpine:3.12
  2. ENTRYPOINT ["/sbin/tini","--","/usr/local/searx/dockerfiles/docker-entrypoint.sh"]
  3. EXPOSE 8080
  4. VOLUME /etc/searx
  5. VOLUME /var/log/uwsgi
  6. ARG SEARX_GID=977
  7. ARG SEARX_UID=977
  8. RUN addgroup -g ${SEARX_GID} searx && \
  9. adduser -u ${SEARX_UID} -D -h /usr/local/searx -s /bin/sh -G searx searx
  10. ENV INSTANCE_NAME=searx \
  11. AUTOCOMPLETE= \
  12. BASE_URL= \
  13. MORTY_KEY= \
  14. MORTY_URL= \
  15. SEARX_SETTINGS_PATH=/etc/searx/settings.yml \
  16. UWSGI_SETTINGS_PATH=/etc/searx/uwsgi.ini
  17. WORKDIR /usr/local/searx
  18. COPY requirements.txt ./requirements.txt
  19. RUN apk upgrade --no-cache \
  20. && apk add --no-cache -t build-dependencies \
  21. build-base \
  22. py3-setuptools \
  23. python3-dev \
  24. libffi-dev \
  25. libxslt-dev \
  26. libxml2-dev \
  27. openssl-dev \
  28. tar \
  29. git \
  30. && apk add --no-cache \
  31. ca-certificates \
  32. su-exec \
  33. python3 \
  34. py3-pip \
  35. libxml2 \
  36. libxslt \
  37. openssl \
  38. tini \
  39. uwsgi \
  40. uwsgi-python3 \
  41. brotli \
  42. && pip3 install --upgrade pip \
  43. && pip3 install --no-cache -r requirements.txt \
  44. && apk del build-dependencies \
  45. && rm -rf /root/.cache
  46. COPY --chown=searx:searx . .
  47. ARG TIMESTAMP_SETTINGS=0
  48. ARG TIMESTAMP_UWSGI=0
  49. ARG VERSION_GITCOMMIT=unknown
  50. RUN su searx -c "/usr/bin/python3 -m compileall -q searx"; \
  51. touch -c --date=@${TIMESTAMP_SETTINGS} searx/settings.yml; \
  52. touch -c --date=@${TIMESTAMP_UWSGI} dockerfiles/uwsgi.ini; \
  53. if [ ! -z $VERSION_GITCOMMIT ]; then\
  54. echo "VERSION_STRING = VERSION_STRING + \"-$VERSION_GITCOMMIT\"" >> /usr/local/searx/searx/version.py; \
  55. fi; \
  56. find /usr/local/searx/searx/static -a \( -name '*.html' -o -name '*.css' -o -name '*.js' \
  57. -o -name '*.svg' -o -name '*.ttf' -o -name '*.eot' \) \
  58. -type f -exec gzip -9 -k {} \+ -exec brotli --best {} \+
  59. # Keep these arguments at the end to prevent redundant layer rebuilds
  60. ARG LABEL_DATE=
  61. ARG GIT_URL=unknown
  62. ARG SEARX_GIT_VERSION=unknown
  63. ARG LABEL_VCS_REF=
  64. ARG LABEL_VCS_URL=
  65. LABEL maintainer="searx <${GIT_URL}>" \
  66. description="A privacy-respecting, hackable metasearch engine." \
  67. version="${SEARX_GIT_VERSION}" \
  68. org.label-schema.schema-version="1.0" \
  69. org.label-schema.name="searx" \
  70. org.label-schema.version="${SEARX_GIT_VERSION}" \
  71. org.label-schema.url="${LABEL_VCS_URL}" \
  72. org.label-schema.vcs-ref=${LABEL_VCS_REF} \
  73. org.label-schema.vcs-url=${LABEL_VCS_URL} \
  74. org.label-schema.build-date="${LABEL_DATE}" \
  75. org.label-schema.usage="https://github.com/searx/searx-docker" \
  76. org.opencontainers.image.title="searx" \
  77. org.opencontainers.image.version="${SEARX_GIT_VERSION}" \
  78. org.opencontainers.image.url="${LABEL_VCS_URL}" \
  79. org.opencontainers.image.revision=${LABEL_VCS_REF} \
  80. org.opencontainers.image.source=${LABEL_VCS_URL} \
  81. org.opencontainers.image.created="${LABEL_DATE}" \
  82. org.opencontainers.image.documentation="https://github.com/searx/searx-docker"