-
Notifications
You must be signed in to change notification settings - Fork 85
/
Dockerfile
56 lines (45 loc) · 1.59 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
FROM python:3.11
LABEL maintainer="MinimalCompact"
VOLUME /data
# base OS packages
RUN \
apt-get update && \
apt-get -y upgrade && \
apt-get -y autoremove && \
apt-get install -y -q \
git \
curl \
libjpeg-turbo-progs \
graphicsmagick \
libgraphicsmagick++3 \
libgraphicsmagick++1-dev \
libgraphicsmagick-q16-3 \
libmagickwand-dev \
zlib1g-dev \
libboost-python-dev \
libmemcached-dev \
gifsicle \
ffmpeg && \
apt-get clean
ENV HOME /app
ENV SHELL bash
ENV WORKON_HOME /app
WORKDIR /app
COPY requirements.txt /app/requirements.txt
RUN pip install --trusted-host None --no-cache-dir -r /app/requirements.txt
COPY conf/thumbor.conf.tpl /app/thumbor.conf.tpl
ARG SIMD_LEVEL
RUN PILLOW_VERSION=$(python -c 'import PIL; print(PIL.__version__)') ; \
if [ "$SIMD_LEVEL" ]; then \
pip uninstall -y pillow || true && \
CC="cc -m$SIMD_LEVEL" pip install --no-cache-dir -U --force-reinstall --no-binary=:all: "pillow-SIMD<=${PILLOW_VERSION}.post99" \
# --global-option="build_ext" --global-option="--debug" \
--global-option="build_ext" --global-option="--enable-lcms" \
--global-option="build_ext" --global-option="--enable-zlib" \
--global-option="build_ext" --global-option="--enable-jpeg" \
--global-option="build_ext" --global-option="--enable-tiff" ; \
fi ;
COPY docker-entrypoint.sh /
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["thumbor", "--port=$THUMBOR_PORT", "-l ${LOG_LEVEL:-debug}", "--processes=${THUMBOR_NUM_PROCESSES:-1}"]
EXPOSE 80 8888