From 792466ed0da8a0becd827a7b54193e29af60f84d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Fri, 18 Sep 2020 08:02:44 +0200 Subject: [PATCH] Use apk --virtual instead of listing build time packages twice --- Dockerfile | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 63eaf52..d981c25 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,7 +23,16 @@ COPY ./requirements.txt /app ENV LLVM_CONFIG=/usr/bin/llvm9-config -RUN apk add --no-cache \ +RUN apk add --no-cache --virtual .build \ + autoconf \ + automake \ + g++ \ + gcc \ + jpeg-dev \ + llvm9-dev\ + make \ + zlib-dev \ + && apk add --no-cache \ python3 \ py3-pip \ py3-scipy \ @@ -31,17 +40,9 @@ RUN apk add --no-cache \ py3-gevent \ zlib \ jpeg \ - gcc \ - g++ \ llvm9 \ - make \ - autoconf \ - automake \ libtool \ supervisor \ - zlib-dev \ - jpeg-dev \ - llvm9-dev \ py3-numpy-dev \ python3-dev && \ mkdir -p /app/cache && \ @@ -50,7 +51,7 @@ RUN apk add --no-cache \ chmod -R o+rw /var/log/supervisor && \ chmod -R o+rw /var/run && \ pip install -r requirements.txt && \ - apk del --no-cache -r gcc g++ make autoconf automake libtool zlib-dev jpeg-dev llvm9-dev + apk del --no-cache -r .build COPY --from=builder /app/we-lang /app/bin/we-lang COPY ./bin /app/bin