-
Notifications
You must be signed in to change notification settings - Fork 10
/
Dockerfile
51 lines (45 loc) · 1.29 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
ARG IMAGE_TAG=3.8.5-alpine3.12
FROM python:${IMAGE_TAG}
ARG PKGNAME
ENV PYTHONDONTWRITEBYTECODE=1
COPY . /app-bundle/
RUN set -eu pipefall \
&& sed -i -e 's/http:\/\//https:\/\//g' /etc/apk/repositories \
&& apk update --no-cache \
&& apk add --no-cache --virtual .build-base \
binutils \
file \
gcc \
g++ \
make \
libc-dev \
musl-dev \
fortify-headers \
patch \
&& apk add --no-cache --virtual .pillow-deps \
freetype-dev \
openjpeg-dev \
libimagequant-dev \
libwebp-dev \
tiff-dev \
libpng-dev \
lcms2-dev \
libjpeg-turbo-dev \
libxcb-dev \
zlib-dev \
&& apk add --no-cache --virtual .pyyaml-deps \
yaml-dev \
cython \
&& cd /app-bundle \
&& python3 -B -m pip --no-cache-dir install .[extra] \
&& find /usr/local -depth \
\( \
\( -type d -a \( -name test -o -name tests -o -name idle_test -o -name __pycache__ \) \) \
-o \
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name '*.pyd' \) \) \
\) | xargs rm -rf \
&& apk del --no-cache --clean-protected --purge \
.build-base \
.pillow-deps \
.pyyaml-deps
ENTRYPOINT ["/bin/ash"]