Skip to content

Commit fec7698

Browse files
committed
change python dockerfile to reduce its size
1 parent 16d7cd4 commit fec7698

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

python/2/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
FROM alpine:3.4
44
MAINTAINER phirov@163.com
55

6-
RUN apk add --no-cache python-dev py-pip g++ && \
6+
RUN apk add --no-cache python-dev py-pip && \
7+
apk add --no-cache --virtual .build-deps g++ && \
8+
apk del .build-deps && \
79
ln -s /usr/include/locale.h /usr/include/xlocale.h && \
810
pip install --upgrade pip

python/3/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
FROM alpine:3.4
44
MAINTAINER phirov@163.com
55

6-
RUN apk add --no-cache python3-dev g++ && \
6+
RUN apk add --no-cache python3-dev && \
7+
apk add --no-cache --virtual .build-deps g++ && \
8+
apk del .build-deps && \
79
ln -s /usr/include/locale.h /usr/include/xlocale.h && \
810
pip3 install --upgrade pip

0 commit comments

Comments
 (0)