-
Notifications
You must be signed in to change notification settings - Fork 56
/
Dockerfile
34 lines (23 loc) · 1.18 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
FROM python:3.5-slim
RUN useradd fishroom
USER fishroom
# COPY fishroom /data/fishroom
COPY requirements.txt /data/requirements.txt
USER root
# RUN echo "deb http://mirrors.tuna.tsinghua.edu.cn/debian/ jessie main contrib non-free" > /etc/apt/sources.list && \
# echo "deb http://mirrors.tuna.tsinghua.edu.cn/debian/ jessie-backports main contrib non-free" >> /etc/apt/sources.list && \
# echo "deb http://mirrors.tuna.tsinghua.edu.cn/debian/ jessie-updates main contrib non-free" >> /etc/apt/sources.list && \
# echo "deb http://mirrors.tuna.tsinghua.edu.cn/debian-security/ jessie/updates main contrib non-free" >> /etc/apt/sources.list
# RUN echo "[global]" > /etc/pip.conf && \
# echo "index-url=https://pypi.tuna.tsinghua.edu.cn/simple" >> /etc/pip.conf
RUN apt-get update && \
apt-get install -y libmagic1 libjpeg62-turbo libjpeg-dev libpng-dev libwebp-dev zlib1g zlib1g-dev gcc mime-support
RUN python3 -m ensurepip && \
pip3 install --upgrade pip setuptools
RUN pip3 install pillow && \
pip3 install -r /data/requirements.txt
RUN apt-get remove -y libjpeg-dev libpng-dev libwebp-dev zlib1g-dev gcc && \
apt-get autoremove -y && \
apt-get clean all
WORKDIR /data
USER fishroom