Ponysearch/Dockerfile

51 lines
1.1 KiB
Text
Raw Normal View History

2015-12-30 11:23:45 +01:00
FROM alpine:3.3
2015-12-30 11:23:45 +01:00
ENV BASE_URL=False IMAGE_PROXY=False
2016-01-03 15:17:59 +01:00
EXPOSE 8888
WORKDIR /usr/local/searx
CMD ["./run.sh"]
2016-01-03 15:45:13 +01:00
RUN adduser -D -h /usr/local/searx -s /bin/sh searx searx \
&& echo '#!/bin/sh' >> run.sh \
&& echo 'sed -i "s|base_url : False|base_url : $BASE_URL|g" searx/settings.yml' >> run.sh \
&& echo 'sed -i "s/image_proxy : False/image_proxy : $IMAGE_PROXY/g" searx.setting.yml' >> run.sh \
2016-01-04 07:38:47 +01:00
&& echo 'sed -i "s/ultrasecretkey/`openssl rand -hex 16`/g" searx/settings.yml' >> run.sh \
2016-01-03 15:45:13 +01:00
&& echo 'python searx/webapp.py' >> run.sh \
&& chmod +x run.sh
2016-01-04 12:52:59 +01:00
COPY requirements.txt .
2015-12-30 11:23:45 +01:00
RUN apk -U add \
build-base \
python \
python-dev \
py-pip \
libxml2 \
libxml2-dev \
libxslt \
libxslt-dev \
libffi-dev \
openssl \
openssl-dev \
ca-certificates \
2016-01-04 12:52:59 +01:00
&& pip install --no-cache -r requirements.txt \
2015-12-30 11:23:45 +01:00
&& apk del \
build-base \
python-dev \
py-pip\
libffi-dev \
openssl-dev \
libxslt-dev \
libxml2-dev \
openssl-dev \
ca-certificates \
&& rm -f /var/cache/apk/*
2015-01-27 23:14:05 +01:00
2016-01-04 12:52:59 +01:00
COPY . .
2016-01-03 15:17:59 +01:00
2016-01-04 12:52:59 +01:00
RUN chown -R searx:searx *
2016-01-03 15:17:59 +01:00
2015-12-30 11:23:45 +01:00
USER searx
2016-01-03 15:17:59 +01:00
2016-01-04 07:38:47 +01:00
RUN sed -i "s/127.0.0.1/0.0.0.0/g" searx/settings.yml