Sfoglia il codice sorgente

Merge pull request #367 from glogiotatidis/dockerfileupdate

Update Dockerfile.
Alexandre Flament 9 anni fa
parent
commit
1b77befe1f
1 ha cambiato i file con 13 aggiunte e 12 eliminazioni
  1. 13
    12
      Dockerfile

+ 13
- 12
Dockerfile Vedi File

@@ -1,21 +1,22 @@
1
-FROM debian:stable
1
+FROM python:2.7-slim
2
+
3
+WORKDIR /app
4
+
5
+RUN useradd searx
6
+
7
+EXPOSE 5000
8
+CMD ["/usr/local/bin/uwsgi", "--uid", "searx", "--gid", "searx", "--http", ":5000", "-w",  "searx.webapp"]
2 9
 
3 10
 RUN apt-get update && \
4 11
     apt-get install -y --no-install-recommends \
5
-            python-dev python2.7-minimal python-virtualenv \
6
-            python-pybabel python-pip zlib1g-dev \
7
-            libxml2-dev libxslt1-dev build-essential \
8
-            openssl
12
+            zlib1g-dev libxml2-dev libxslt1-dev libffi-dev build-essential \
13
+            libssl-dev openssl && \
14
+    rm -rf /var/lib/apt/lists/*
9 15
 
10
-RUN useradd searx
16
+RUN pip install --no-cache uwsgi
11 17
 
12
-WORKDIR /app
13
-RUN pip install uwsgi
14 18
 COPY requirements.txt /app/requirements.txt
15
-RUN pip install -r requirements.txt
19
+RUN pip install --no-cache -r requirements.txt
16 20
 
17 21
 COPY . /app
18 22
 RUN sed -i -e "s/ultrasecretkey/`openssl rand -hex 16`/g" searx/settings.yml
19
-
20
-EXPOSE 5000
21
-CMD ["/usr/local/bin/uwsgi", "--uid", "searx", "--gid", "searx", "--http", ":5000", "-w",  "searx.webapp"]