diff options
author | Wonderfall <wonderfall@riseup.net> | 2016-01-03 15:45:13 +0100 |
---|---|---|
committer | Wonderfall <wonderfall@riseup.net> | 2016-01-03 15:45:13 +0100 |
commit | b0587a022710a0b4a090c8925ff6715f4008d2a9 (patch) | |
tree | aa87c0bc35f972d9396815f7461d6373548813fd /Dockerfile | |
parent | 414c4f4ca40a1cf626c3f539517ac6c5d60cce09 (diff) | |
download | searxng-b0587a022710a0b4a090c8925ff6715f4008d2a9.tar.gz searxng-b0587a022710a0b4a090c8925ff6715f4008d2a9.zip |
Better Dockerfile
Diffstat (limited to 'Dockerfile')
-rw-r--r-- | Dockerfile | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Dockerfile b/Dockerfile index 5b9638e01..c5c56d1b3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,6 +8,13 @@ WORKDIR /usr/local/searx CMD ["./run.sh"] +RUN adduser -D -h /usr/local/searx -s /bin/sh searx searx \ + && echo '#!/bin/sh' >> run.sh \ + && 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.setting.yml' >> run.sh \ + && echo 'python searx/webapp.py' >> run.sh \ + && chmod +x run.sh + COPY requirements.txt /usr/local/searx/requirements.txt RUN apk -U add \ @@ -38,17 +45,10 @@ RUN apk -U add \ COPY . /usr/local/searx -RUN adduser -D -h /usr/local/searx -s /bin/sh searx searx \ - && chown -R searx:searx /usr/local/searx +RUN chown -R searx:searx /usr/local/searx USER searx RUN cd /usr/local/searx \ && sed -i "s/127.0.0.1/0.0.0.0/g" searx/settings.yml \ && sed -i "s/ultrasecretkey/`openssl rand -hex 16`/g" searx/settings.yml - -RUN echo '#!/bin/sh' >> run.sh \ - && 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.setting.yml' >> run.sh \ - && echo 'python searx/webapp.py' >> run.sh \ - && chmod +x run.sh |