summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpelag0s <maze@solvingmaz.es>2019-01-12 11:06:44 +0100
committerpelag0s <maze@solvingmaz.es>2019-01-12 11:10:00 +0100
commitc1af891707a62228fd6fe5a6f3a9961a360a5173 (patch)
treeb8296be6096399fa9b921ab647f6207a9602694c
parent383e3cc554a3704cd8b076aa686f32b8ce78f681 (diff)
downloadsearxng-c1af891707a62228fd6fe5a6f3a9961a360a5173.tar.gz
searxng-c1af891707a62228fd6fe5a6f3a9961a360a5173.zip
docker: allow configuring http proxy via env variables
-rw-r--r--Dockerfile3
1 files changed, 3 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
index 1680c7bb2..51ecf9bd3 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -12,6 +12,9 @@ RUN adduser -D -h /usr/local/searx -s /bin/sh searx searx \
&& echo 'sed -i "s|base_url : False|base_url : $BASE_URL|g" searx/settings.yml' >> run.sh \
&& echo 'sed -i "s/image_proxy : False/image_proxy : $IMAGE_PROXY/g" searx/settings.yml' >> run.sh \
&& echo 'sed -i "s/ultrasecretkey/`openssl rand -hex 16`/g" searx/settings.yml' >> run.sh \
+ && echo 'if [ -n "$HTTP_PROXY_URL" ] || [ -n "$HTTPS_PROXY_URL" ]; then' >> run.sh \
+ && echo ' sed -i "s~^# proxies :~ proxies:\\n http: ${HTTP_PROXY_URL}\\n https: ${HTTPS_PROXY_URL}\\n~" searx/settings.yml' >> run.sh \
+ && echo 'fi' >> run.sh \
&& echo 'python searx/webapp.py' >> run.sh \
&& chmod +x run.sh