56 lines
1.9 KiB
Docker
56 lines
1.9 KiB
Docker
ARG ARCH
|
|
FROM amd64/alpine:3.13.2@sha256:4661fb57f7890b9145907a1fe2555091d333ff3d28db86c3bb906f6a2be93c87 AS base-amd64
|
|
FROM arm32v7/alpine:3.13.2@sha256:db5f021b29ec8fcf605f00d2aac06345756b0ffbdea0e7994044fe9172619a0a AS base-arm
|
|
FROM arm64v8/alpine:3.13.2@sha256:c45a1db6e04b73aad9e06b08f2de11ce8e92d894141b2e801615fa7a8f68314a AS base-arm64
|
|
FROM base-${ARCH}
|
|
|
|
RUN addgroup searx && adduser -D -h /usr/local/searx -s /bin/sh -G searx searx
|
|
|
|
ENV SEARX_VERSION="v0.18.0"
|
|
ENV INSTANCE_NAME=searx
|
|
|
|
WORKDIR /usr/local/searx
|
|
|
|
RUN apk upgrade --no-cache \
|
|
&& apk add --no-cache -t build-dependencies \
|
|
gcc="10.2.1_pre1-r3" \
|
|
musl-dev="1.2.2-r0" \
|
|
cargo="1.47.0-r2" \
|
|
build-base="0.5-r2" \
|
|
py3-setuptools="51.3.3-r0" \
|
|
python3-dev="3.8.7-r0" \
|
|
libffi-dev="3.3-r2" \
|
|
libxslt-dev="1.1.34-r0" \
|
|
libxml2-dev="2.9.10-r6" \
|
|
openssl-dev="1.1.1j-r0" \
|
|
tar="1.33-r1" \
|
|
git="2.30.1-r0" \
|
|
curl="7.74.0-r0" \
|
|
&& apk add --no-cache \
|
|
ca-certificates="20191127-r5" \
|
|
su-exec="0.2-r1" \
|
|
python3="3.8.7-r0" \
|
|
py3-pip="20.3.4-r0" \
|
|
libxml2="2.9.10-r6" \
|
|
libxslt="1.1.34-r0" \
|
|
openssl="1.1.1j-r0" \
|
|
tini="0.19.0-r0" \
|
|
uwsgi="2.0.19.1-r1" \
|
|
uwsgi-python3="2.0.19.1-r1" \
|
|
brotli="1.0.9-r3" \
|
|
&& curl -L "https://github.com/searx/searx/archive/${SEARX_VERSION}.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 {} \+
|
|
|
|
EXPOSE 8080
|
|
|
|
ENTRYPOINT ["/sbin/tini","--","/usr/local/searx/dockerfiles/docker-entrypoint.sh"]
|