added initial searx Dockerfile

This commit is contained in:
Samuel Philipp 2021-01-20 20:18:17 +01:00
parent 4d1c002e7a
commit 1b90bd8732
3 changed files with 109 additions and 0 deletions

2
.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
.idea/
*.iml

33
renovate.json Normal file
View file

@ -0,0 +1,33 @@
{
"assignees": [
"samuel-p"
],
"baseBranches": [
"main"
],
"rangeStrategy": "bump",
"regexManagers": [
{
"fileMatch": [
"(^|/|\\.)Dockerfile$",
"(^|/)Dockerfile\\.[^/]*$"
],
"matchStrings": [
"#\\s*github:\\s*(?<depName>.*?)\\s*.*?=\"(?<currentValue>.*?)\"\\s*"
],
"versioningTemplate": "loose",
"datasourceTemplate": "github-releases"
},
{
"fileMatch": [
"(^|/|\\.)Dockerfile$",
"(^|/)Dockerfile\\.[^/]*$"
],
"matchStrings": [
"#\\s*repology:\\s*(?<depName>.*?)\\s*.*?=\"(?<currentValue>.*?)\"\\s*"
],
"versioningTemplate": "loose",
"datasourceTemplate": "repology"
}
]
}

74
searx/Dockerfile Normal file
View file

@ -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 {} \+