From 1b90bd87327103adf530c646e6efe051869cdb8c Mon Sep 17 00:00:00 2001 From: samuel-p Date: Wed, 20 Jan 2021 20:18:17 +0100 Subject: [PATCH] added initial searx Dockerfile --- .gitignore | 2 ++ renovate.json | 33 +++++++++++++++++++++ searx/Dockerfile | 74 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 109 insertions(+) create mode 100644 .gitignore create mode 100644 renovate.json create mode 100644 searx/Dockerfile diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1062418 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.idea/ +*.iml diff --git a/renovate.json b/renovate.json new file mode 100644 index 0000000..f182015 --- /dev/null +++ b/renovate.json @@ -0,0 +1,33 @@ +{ + "assignees": [ + "samuel-p" + ], + "baseBranches": [ + "main" + ], + "rangeStrategy": "bump", + "regexManagers": [ + { + "fileMatch": [ + "(^|/|\\.)Dockerfile$", + "(^|/)Dockerfile\\.[^/]*$" + ], + "matchStrings": [ + "#\\s*github:\\s*(?.*?)\\s*.*?=\"(?.*?)\"\\s*" + ], + "versioningTemplate": "loose", + "datasourceTemplate": "github-releases" + }, + { + "fileMatch": [ + "(^|/|\\.)Dockerfile$", + "(^|/)Dockerfile\\.[^/]*$" + ], + "matchStrings": [ + "#\\s*repology:\\s*(?.*?)\\s*.*?=\"(?.*?)\"\\s*" + ], + "versioningTemplate": "loose", + "datasourceTemplate": "repology" + } + ] +} diff --git a/searx/Dockerfile b/searx/Dockerfile new file mode 100644 index 0000000..0eadff8 --- /dev/null +++ b/searx/Dockerfile @@ -0,0 +1,74 @@ +# repology: depNamePrefix=alpine_3_13 +FROM alpine:3.13.0@sha256:d0710affa17fad5f466a70159cc458227bd25d4afb39514ef662ead3e6c99515 + +# github: searx/searx +ENV SEARX="v0.17.0" + +ENTRYPOINT ["/sbin/tini","--","/usr/local/searx/dockerfiles/docker-entrypoint.sh"] +EXPOSE 8080 +VOLUME /etc/searx +VOLUME /var/log/uwsgi + +RUN addgroup searx && adduser -D -h /usr/local/searx -s /bin/sh -G searx searx + +ENV INSTANCE_NAME=searx + +WORKDIR /usr/local/searx + +RUN apk upgrade --no-cache \ + && apk add --no-cache -t build-dependencies \ + # repology: alpine_edge/build-base + build-base="0.5-r2" \ + # repology: alpine_edge/py3-setuptools + py3-setuptools="47.0.0-r0" \ + # repology: alpine_edge/python3-dev + python3-dev="3.8.7-r0" \ + # repology: alpine_edge/libffi-dev + libffi-dev="3.3-r2" \ + # repology: alpine_edge/libxslt-dev + libxslt-dev="1.1.34-r0" \ + # repology: alpine_edge/libxml2-dev + libxml2-dev="2.9.10-r5" \ + # repology: alpine_edge/openssl-dev + openssl-dev="1.1.1i-r0" \ + # repology: alpine_edge/tar + tar="1.32-r1" \ + # repology: alpine_edge/git + git="2.26.2-r0" \ + # repology: alpine_edge/curl + curl="7.69.1-r3" \ + && apk add --no-cache \ + # repology: alpine_edge/ca-certificates + ca-certificates="20191127-r4" \ + # repology: alpine_edge/su-exec + su-exec="0.2-r1" \ + # repology: alpine_edge/python3 + python3="3.8.5-r0" \ + # repology: alpine_edge/py3-pip + py3-pip="20.1.1-r0" \ + # repology: alpine_edge/libxml2 + libxml2="2.9.10-r5" \ + # repology: alpine_edge/libxslt + libxslt="1.1.34-r0" \ + # repology: alpine_edge/openssl + openssl="1.1.1i-r0" \ + # repology: alpine_edge/tini + tini="0.19.0-r0" \ + # repology: alpine_edge/uwsgi + uwsgi="2.0.18-r8" \ + # repology: alpine_edge/uwsgi-python3 + uwsgi-python3="2.0.18-r8" \ + # repology: alpine_edge/brotli + brotli="1.0.9-r1" \ + && curl -L "https://github.com/searx/searx/archive/${SEARX}.tar.gz" | tar xvz --strip 1 && chown -R searx:searx * \ + && pip3 install --upgrade pip \ + && pip3 install --no-cache -r requirements.txt \ + && apk del build-dependencies \ + && rm -rf /root/.cache + +RUN su searx -c "/usr/bin/python3 -m compileall -q searx"; \ + touch -c searx/settings.yml; \ + touch -c dockerfiles/uwsgi.ini; \ + find /usr/local/searx/searx/static -a \( -name '*.html' -o -name '*.css' -o -name '*.js' \ + -o -name '*.svg' -o -name '*.ttf' -o -name '*.eot' \) \ + -type f -exec gzip -9 -k {} \+ -exec brotli --best {} \+