on engine-data help sign in
searx/Dockerfile
95 lines 2.9 kB history raw
1FROM alpine:3.12
2ENTRYPOINT ["/sbin/tini","--","/usr/local/searx/dockerfiles/docker-entrypoint.sh"]
3EXPOSE 8080
4VOLUME /etc/searx
5VOLUME /var/log/uwsgi
7ARG GIT_URL=unknown
8ARG VERSION_GITCOMMIT=unknown
9ARG SEARX_GIT_VERSION=unknown
11ARG SEARX_GID=977
12ARG SEARX_UID=977
14RUN addgroup -g ${SEARX_GID} searx && \
15 adduser -u ${SEARX_UID} -D -h /usr/local/searx -s /bin/sh -G searx searx
17ARG TIMESTAMP_SETTINGS=0
18ARG TIMESTAMP_UWSGI=0
19ARG LABEL_VCS_REF=
20ARG LABEL_VCS_URL=
22ENV INSTANCE_NAME=searx \
23 AUTOCOMPLETE= \
24 BASE_URL= \
25 MORTY_KEY= \
26 MORTY_URL=
28WORKDIR /usr/local/searx
31COPY requirements.txt ./requirements.txt
33RUN apk upgrade --no-cache \
34 && apk add --no-cache -t build-dependencies \
35 build-base \
36 py3-setuptools \
37 python3-dev \
38 libffi-dev \
39 libxslt-dev \
40 libxml2-dev \
41 openssl-dev \
42 tar \
43 git \
44 protoc \
45 protobuf-dev \
46 && apk add --no-cache \
47 ca-certificates \
48 su-exec \
49 python3 \
50 py3-pip \
51 libxml2 \
52 libxslt \
53 openssl \
54 tini \
55 uwsgi \
56 uwsgi-python3 \
57 brotli \
58 protobuf \
59 && pip3 install --upgrade pip \
60 && pip3 install --no-cache -r requirements.txt \
61 && apk del build-dependencies \
62 && rm -rf /root/.cache
64COPY --chown=searx:searx . .
66RUN su searx -c "/usr/bin/python3 -m compileall -q searx"; \
67 touch -c --date=@${TIMESTAMP_SETTINGS} searx/settings.yml; \
68 touch -c --date=@${TIMESTAMP_UWSGI} dockerfiles/uwsgi.ini; \
69 if [ ! -z $VERSION_GITCOMMIT ]; then\
70 echo "VERSION_STRING = VERSION_STRING + \"-$VERSION_GITCOMMIT\"" >> /usr/local/searx/searx/version.py; \
71 fi; \
72 find /usr/local/searx/searx/static -a \( -name '*.html' -o -name '*.css' -o -name '*.js' \
73 -o -name '*.svg' -o -name '*.ttf' -o -name '*.eot' \) \
74 -type f -exec gzip -9 -k {} \+ -exec brotli --best {} \+
76# Keep this argument at the end since it change each time
77ARG LABEL_DATE=
78LABEL maintainer="searx <${GIT_URL}>" \
79 description="A privacy-respecting, hackable metasearch engine." \
80 version="${SEARX_GIT_VERSION}" \
81 org.label-schema.schema-version="1.0" \
82 org.label-schema.name="searx" \
83 org.label-schema.version="${SEARX_GIT_VERSION}" \
84 org.label-schema.url="${LABEL_VCS_URL}" \
85 org.label-schema.vcs-ref=${LABEL_VCS_REF} \
86 org.label-schema.vcs-url=${LABEL_VCS_URL} \
87 org.label-schema.build-date="${LABEL_DATE}" \
88 org.label-schema.usage="https://github.com/searx/searx-docker" \
89 org.opencontainers.image.title="searx" \
90 org.opencontainers.image.version="${SEARX_GIT_VERSION}" \
91 org.opencontainers.image.url="${LABEL_VCS_URL}" \
92 org.opencontainers.image.revision=${LABEL_VCS_REF} \
93 org.opencontainers.image.source=${LABEL_VCS_URL} \
94 org.opencontainers.image.created="${LABEL_DATE}" \
95 org.opencontainers.image.documentation="https://github.com/searx/searx-docker"