logo

searx

My custom branche(s) on searx, a meta-search engine git clone https://hacktivis.me/git/searx.git

Dockerfile (1465B)


  1. FROM alpine:3.8
  2. LABEL maintainer="searx <https://github.com/asciimoo/searx>"
  3. LABEL description="A privacy-respecting, hackable metasearch engine."
  4. ENV BASE_URL=False IMAGE_PROXY=False
  5. EXPOSE 8888
  6. WORKDIR /usr/local/searx
  7. CMD ["/sbin/tini","--","/usr/local/searx/run.sh"]
  8. RUN adduser -D -h /usr/local/searx -s /bin/sh searx searx \
  9. && echo '#!/bin/sh' >> run.sh \
  10. && echo 'sed -i "s|base_url : False|base_url : $BASE_URL|g" searx/settings.yml' >> run.sh \
  11. && echo 'sed -i "s/image_proxy : False/image_proxy : $IMAGE_PROXY/g" searx/settings.yml' >> run.sh \
  12. && echo 'sed -i "s/ultrasecretkey/`openssl rand -hex 16`/g" searx/settings.yml' >> run.sh \
  13. && echo 'python searx/webapp.py' >> run.sh \
  14. && chmod +x run.sh
  15. COPY requirements.txt ./requirements.txt
  16. RUN echo "@commuedge http://nl.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories \
  17. && apk -U add \
  18. build-base \
  19. python \
  20. python-dev \
  21. py-pip \
  22. libxml2 \
  23. libxml2-dev \
  24. libxslt \
  25. libxslt-dev \
  26. libffi-dev \
  27. openssl \
  28. openssl-dev \
  29. ca-certificates \
  30. tini@commuedge \
  31. && pip install --upgrade pip \
  32. && pip install --no-cache -r requirements.txt \
  33. && apk del \
  34. build-base \
  35. python-dev \
  36. libffi-dev \
  37. openssl-dev \
  38. libxslt-dev \
  39. libxml2-dev \
  40. openssl-dev \
  41. ca-certificates \
  42. && rm -f /var/cache/apk/*
  43. COPY . .
  44. RUN chown -R searx:searx *
  45. USER searx
  46. RUN sed -i "s/127.0.0.1/0.0.0.0/g" searx/settings.yml