This repository has been archived on 2022-07-19. You can view files and clone it, but cannot push or open issues or pull requests.
searx/Dockerfile

29 lines
1.2 KiB
Text
Raw Permalink Normal View History

2022-07-19 04:01:19 +00:00
FROM alpine:3.16.1@sha256:7580ece7963bfa863801466c0a488f11c86f85d9988051a9f9c68cb27f6b7872
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 \
2021-11-26 22:12:23 +00:00
&& 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 \
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"]