2021-01-21 00:14:47 +00:00
|
|
|
ARG ARCH
|
2021-06-16 04:02:58 +00:00
|
|
|
FROM amd64/alpine:3.14.0@sha256:1775bebec23e1f3ce486989bfc9ff3c4e951690df84aa9f926497d82f2ffca9d AS base-amd64
|
2021-07-30 19:01:36 +00:00
|
|
|
FROM arm32v7/alpine:3.14.0@sha256:088557f18d845a348b4039a63c1266b09dfbe45619dc259f05742d902edd5f25 AS base-arm
|
2021-06-16 04:02:58 +00:00
|
|
|
FROM arm64v8/alpine:3.14.0@sha256:53b74ddfc6225e3c8cc84d7985d0f34666e4e8b0b6892a9b2ad1f7516bc21b54 AS base-arm64
|
2021-01-21 00:14:47 +00:00
|
|
|
FROM base-${ARCH}
|
2021-01-20 19:18:17 +00:00
|
|
|
|
|
|
|
RUN addgroup searx && adduser -D -h /usr/local/searx -s /bin/sh -G searx searx
|
|
|
|
|
2021-03-27 20:01:23 +00:00
|
|
|
ENV SEARX_VERSION="1.0.0"
|
2021-01-20 19:18:17 +00:00
|
|
|
ENV INSTANCE_NAME=searx
|
|
|
|
|
|
|
|
WORKDIR /usr/local/searx
|
|
|
|
|
|
|
|
RUN apk upgrade --no-cache \
|
|
|
|
&& apk add --no-cache -t build-dependencies \
|
2021-06-24 19:02:13 +00:00
|
|
|
gcc="10.3.1_git20210424-r2" \
|
|
|
|
musl-dev="1.2.2-r3" \
|
|
|
|
cargo="1.52.0-r0" \
|
2021-01-20 19:18:17 +00:00
|
|
|
build-base="0.5-r2" \
|
2021-06-24 19:02:18 +00:00
|
|
|
py3-setuptools="52.0.0-r3" \
|
2021-06-24 19:02:13 +00:00
|
|
|
python3-dev="3.9.5-r1" \
|
2021-01-20 19:18:17 +00:00
|
|
|
libffi-dev="3.3-r2" \
|
2021-06-24 19:02:13 +00:00
|
|
|
libxslt-dev="1.1.34-r1" \
|
|
|
|
libxml2-dev="2.9.12-r1" \
|
2021-03-25 17:02:14 +00:00
|
|
|
openssl-dev="1.1.1k-r0" \
|
2021-04-07 04:01:50 +00:00
|
|
|
tar="1.34-r0" \
|
2021-06-24 19:02:13 +00:00
|
|
|
git="2.32.0-r0" \
|
2021-06-16 16:02:20 +00:00
|
|
|
curl="7.77.0-r1" \
|
2021-01-20 19:18:17 +00:00
|
|
|
&& apk add --no-cache \
|
2021-01-30 01:10:47 +00:00
|
|
|
ca-certificates="20191127-r5" \
|
2021-01-20 19:18:17 +00:00
|
|
|
su-exec="0.2-r1" \
|
2021-06-24 19:02:13 +00:00
|
|
|
python3="3.9.5-r1" \
|
|
|
|
py3-pip="20.3.4-r1" \
|
|
|
|
libxml2="2.9.12-r1" \
|
|
|
|
libxslt="1.1.34-r1" \
|
2021-03-25 17:02:14 +00:00
|
|
|
openssl="1.1.1k-r0" \
|
2021-01-20 19:18:17 +00:00
|
|
|
tini="0.19.0-r0" \
|
2021-06-24 19:02:13 +00:00
|
|
|
uwsgi="2.0.19.1-r2" \
|
|
|
|
uwsgi-python3="2.0.19.1-r2" \
|
|
|
|
brotli="1.0.9-r5" \
|
2021-01-21 22:44:06 +00:00
|
|
|
&& curl -L "https://github.com/searx/searx/archive/${SEARX_VERSION}.tar.gz" | tar xvz --strip 1 && chown -R searx:searx * \
|
2021-01-20 19:18:17 +00:00
|
|
|
&& 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 {} \+
|
2021-02-01 19:13:29 +00:00
|
|
|
|
|
|
|
EXPOSE 8080
|
|
|
|
|
|
|
|
ENTRYPOINT ["/sbin/tini","--","/usr/local/searx/dockerfiles/docker-entrypoint.sh"]
|