@@ -2,7 +2,7 @@ FROM alpine:3.8
22LABEL maintainer="searx <https://github.com/asciimoo/searx>"
33LABEL description="A privacy-respecting, hackable metasearch engine."
44
5−ENV BASE_URL=False IMAGE_PROXY=False
5+ENV BASE_URL=False IMAGE_PROXY=False HTTP_PROXY_URL= HTTPS_PROXY_URL=
66EXPOSE 8888
77WORKDIR /usr/local/searx
88CMD ["/sbin/tini","--","/usr/local/searx/run.sh"]
@@ -12,6 +12,9 @@ RUN adduser -D -h /usr/local/searx -s /bin/sh searx searx \
1212 && echo 'sed -i "s|base_url : False|base_url : $BASE_URL|g" searx/settings.yml' >> run.sh \
1313 && echo 'sed -i "s/image_proxy : False/image_proxy : $IMAGE_PROXY/g" searx/settings.yml' >> run.sh \
1414 && echo 'sed -i "s/ultrasecretkey/`openssl rand -hex 16`/g" searx/settings.yml' >> run.sh \
15+ && echo 'if [ -n "$HTTP_PROXY_URL" ] || [ -n "$HTTPS_PROXY_URL" ]; then' >> run.sh \
16+ && echo ' sed -i "s~^# proxies :~ proxies:\\n http: ${HTTP_PROXY_URL}\\n https: ${HTTPS_PROXY_URL}\\n~" searx/settings.yml' >> run.sh \
17+ && echo 'fi' >> run.sh \
1518 && echo 'python searx/webapp.py' >> run.sh \
1619 && chmod +x run.sh
1720