瀏覽代碼

Merge pull request #367 from glogiotatidis/dockerfileupdate

Update Dockerfile.
Alexandre Flament 10 年之前
父節點
當前提交
1b77befe1f
共有 1 個檔案被更改,包括 13 行新增12 行删除
  1. 13
    12
      Dockerfile

+ 13
- 12
Dockerfile 查看文件

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
 RUN apt-get update && \
10
 RUN apt-get update && \
4
     apt-get install -y --no-install-recommends \
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
 COPY requirements.txt /app/requirements.txt
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
 COPY . /app
21
 COPY . /app
18
 RUN sed -i -e "s/ultrasecretkey/`openssl rand -hex 16`/g" searx/settings.yml
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"]