major refactorings and improvements
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
49be5497e2
commit
daeda70a60
4 changed files with 22 additions and 36 deletions
54
Dockerfile
Normal file
54
Dockerfile
Normal file
|
@ -0,0 +1,54 @@
|
|||
ARG ARCH
|
||||
FROM amd64/alpine:3.12.3@sha256:074d3636ebda6dd446d0d00304c4454f468237fdacf08fb0eeac90bdbfa1bac7 AS base-amd64
|
||||
FROM arm32v7/alpine:3.12.3@sha256:299294be8699c1b323c137f972fd0aa5eaa4b95489c213091dcf46ef39b6c810 AS base-arm
|
||||
FROM arm64v8/alpine:3.12.3@sha256:549694ea68340c26d1d85c00039aa11ad835be279bfd475ff4284b705f92c24e AS base-arm64
|
||||
FROM base-${ARCH}
|
||||
|
||||
ENTRYPOINT ["/sbin/tini","--","/usr/local/searx/dockerfiles/docker-entrypoint.sh"]
|
||||
EXPOSE 8080
|
||||
VOLUME /etc/searx
|
||||
VOLUME /var/log/uwsgi
|
||||
|
||||
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 \
|
||||
build-base="0.5-r2" \
|
||||
py3-setuptools="47.0.0-r0" \
|
||||
python3-dev="3.8.5-r0" \
|
||||
libffi-dev="3.3-r2" \
|
||||
libxslt-dev="1.1.34-r0" \
|
||||
libxml2-dev="2.9.10-r5" \
|
||||
openssl-dev="1.1.1i-r0" \
|
||||
tar="1.32-r1" \
|
||||
git="2.26.2-r0" \
|
||||
curl="7.69.1-r3" \
|
||||
&& apk add --no-cache \
|
||||
ca-certificates="20191127-r4" \
|
||||
su-exec="0.2-r1" \
|
||||
python3="3.8.5-r0" \
|
||||
py3-pip="20.1.1-r0" \
|
||||
libxml2="2.9.10-r5" \
|
||||
libxslt="1.1.34-r0" \
|
||||
openssl="1.1.1i-r0" \
|
||||
tini="0.19.0-r0" \
|
||||
uwsgi="2.0.18-r8" \
|
||||
uwsgi-python3="2.0.18-r8" \
|
||||
brotli="1.0.9-r1" \
|
||||
&& 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 {} \+
|
Reference in a new issue