FROM alpine:3.16.1@sha256:7580ece7963bfa863801466c0a488f11c86f85d9988051a9f9c68cb27f6b7872 RUN addgroup searx && adduser -D -h /usr/local/searx -s /bin/sh -G searx searx ENV SEARX_VERSION="1.0.0" ENV INSTANCE_NAME=searx WORKDIR /usr/local/searx RUN apk upgrade --no-cache \ && apk add --no-cache -t build-dependencies gcc musl-dev cargo build-base py3-setuptools python3-dev libffi-dev libxslt-dev libxml2-dev openssl-dev tar git curl \ && apk add --no-cache ca-certificates su-exec python3 py3-pip libxml2 libxslt openssl tini uwsgi uwsgi-python3 brotli \ && 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"]