summaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
authorGiorgos Logiotatidis <seadog@sealabs.net>2015-06-10 11:50:00 +0300
committerGiorgos Logiotatidis <seadog@sealabs.net>2015-06-10 12:39:19 +0300
commit316c4607f2d81d9fd619cb61cf9317347f3432bc (patch)
treea1b75ec20588169445dc61f73953f959cff5b712 /Dockerfile
parentf2cbefeb54164fb659c5901269d0210ad682861c (diff)
downloadsearxng-316c4607f2d81d9fd619cb61cf9317347f3432bc.tar.gz
searxng-316c4607f2d81d9fd619cb61cf9317347f3432bc.zip
Update Dockerfile.
- Install new packages needed to deploy search - Optimize dockerfile for more docker deamon caching - Pin a python2.7 base image.
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile25
1 files changed, 13 insertions, 12 deletions
diff --git a/Dockerfile b/Dockerfile
index 831a429e2..543c74d0e 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,21 +1,22 @@
-FROM debian:stable
+FROM python:2.7-slim
+
+WORKDIR /app
+
+RUN useradd searx
+
+EXPOSE 5000
+CMD ["/usr/local/bin/uwsgi", "--uid", "searx", "--gid", "searx", "--http", ":5000", "-w", "searx.webapp"]
RUN apt-get update && \
apt-get install -y --no-install-recommends \
- python-dev python2.7-minimal python-virtualenv \
- python-pybabel python-pip zlib1g-dev \
- libxml2-dev libxslt1-dev build-essential \
- openssl
+ zlib1g-dev libxml2-dev libxslt1-dev libffi-dev build-essential \
+ libssl-dev openssl && \
+ rm -rf /var/lib/apt/lists/*
-RUN useradd searx
+RUN pip install --no-cache uwsgi
-WORKDIR /app
-RUN pip install uwsgi
COPY requirements.txt /app/requirements.txt
-RUN pip install -r requirements.txt
+RUN pip install --no-cache -r requirements.txt
COPY . /app
RUN sed -i -e "s/ultrasecretkey/`openssl rand -hex 16`/g" searx/settings.yml
-
-EXPOSE 5000
-CMD ["/usr/local/bin/uwsgi", "--uid", "searx", "--gid", "searx", "--http", ":5000", "-w", "searx.webapp"]