mirror of
https://github.com/hoellen/dockerfiles.git
synced 2025-07-01 14:45:38 +00:00
switch base to alpine edge
This commit is contained in:
@ -1,49 +1,41 @@
|
||||
FROM alpine:3.3
|
||||
MAINTAINER Wonderfall <wonderfall@mondedie.fr>
|
||||
FROM alpine:edge
|
||||
MAINTAINER Wonderfall <wonderfall@schrodinger.io>
|
||||
|
||||
ENV BASE_URL=False IMAGE_PROXY=False
|
||||
|
||||
RUN echo "@commuedge http://nl.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories \
|
||||
&& apk -U add \
|
||||
&& BUILD_DEPS=" \
|
||||
build-base \
|
||||
python \
|
||||
python-dev \
|
||||
py-pip \
|
||||
libxml2 \
|
||||
libxml2-dev \
|
||||
libxslt \
|
||||
libxslt-dev \
|
||||
libffi-dev \
|
||||
openssl \
|
||||
libxslt-dev \
|
||||
libxml2-dev \
|
||||
openssl-dev \
|
||||
ca-certificates \
|
||||
tar \
|
||||
ca-certificates" \
|
||||
&& apk -U add \
|
||||
${BUILD_DEPS} \
|
||||
python \
|
||||
libxml2 \
|
||||
libxslt \
|
||||
openssl \
|
||||
tini@commuedge \
|
||||
&& pip install --no-cache -r https://raw.githubusercontent.com/asciimoo/searx/master/requirements.txt \
|
||||
&& apk del \
|
||||
build-base \
|
||||
python-dev \
|
||||
py-pip \
|
||||
libffi-dev \
|
||||
libxslt-dev \
|
||||
libxml2-dev \
|
||||
openssl-dev \
|
||||
ca-certificates \
|
||||
&& mkdir /usr/local/searx && cd /usr/local/searx \
|
||||
&& wget -qO- https://github.com/asciimoo/searx/archive/master.tar.gz | tar xz --strip 1 \
|
||||
&& sed -i "s/127.0.0.1/0.0.0.0/g" searx/settings.yml \
|
||||
&& adduser -D -h /usr/local/searx -s /bin/sh searx searx \
|
||||
&& chown -R searx:searx /usr/local/searx \
|
||||
&& apk del ${BUILD_DEPS} \
|
||||
&& rm -f /var/cache/apk/*
|
||||
|
||||
RUN adduser -D -h /usr/local/searx -s /bin/sh searx searx
|
||||
|
||||
COPY run.sh /usr/local/bin/run.sh
|
||||
|
||||
RUN chmod +x /usr/local/bin/run.sh
|
||||
|
||||
USER searx
|
||||
|
||||
WORKDIR /usr/local/searx
|
||||
|
||||
RUN wget -qO- https://github.com/asciimoo/searx/archive/master.tar.gz | tar xz --strip 1 \
|
||||
&& sed -i "s/127.0.0.1/0.0.0.0/g" searx/settings.yml
|
||||
|
||||
EXPOSE 8888
|
||||
LABEL description "A powerful meta-search engine"
|
||||
|
||||
CMD ["/sbin/tini","--","run.sh"]
|
||||
|
10
searx/run.sh
10
searx/run.sh
@ -1,5 +1,7 @@
|
||||
#!/bin/sh
|
||||
sed -i "s|base_url : False|base_url : $BASE_URL|g" searx/settings.yml
|
||||
sed -i "s/image_proxy : False/image_proxy : $IMAGE_PROXY/g" searx/settings.yml
|
||||
sed -i "s/ultrasecretkey/`openssl rand -hex 16`/g" searx/settings.yml
|
||||
python searx/webapp.py
|
||||
sed -i -e "s|base_url : False|base_url : ${BASE_URL}|g" \
|
||||
-e "s/image_proxy : False/image_proxy : ${IMAGE_PROXY}/g" \
|
||||
-e "s/ultrasecretkey/$(openssl rand -hex 16)/g" \
|
||||
/usr/local/searx/searx/settings.yml
|
||||
|
||||
python /usr/local/searx/searx/webapp.py
|
||||
|
Reference in New Issue
Block a user