Use apk --virtual instead of listing build time packages twice
This commit is contained in:
parent
63ef3d02a9
commit
792466ed0d
1 changed files with 11 additions and 10 deletions
21
Dockerfile
21
Dockerfile
|
|
@ -23,7 +23,16 @@ COPY ./requirements.txt /app
|
||||||
|
|
||||||
ENV LLVM_CONFIG=/usr/bin/llvm9-config
|
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 \
|
python3 \
|
||||||
py3-pip \
|
py3-pip \
|
||||||
py3-scipy \
|
py3-scipy \
|
||||||
|
|
@ -31,17 +40,9 @@ RUN apk add --no-cache \
|
||||||
py3-gevent \
|
py3-gevent \
|
||||||
zlib \
|
zlib \
|
||||||
jpeg \
|
jpeg \
|
||||||
gcc \
|
|
||||||
g++ \
|
|
||||||
llvm9 \
|
llvm9 \
|
||||||
make \
|
|
||||||
autoconf \
|
|
||||||
automake \
|
|
||||||
libtool \
|
libtool \
|
||||||
supervisor \
|
supervisor \
|
||||||
zlib-dev \
|
|
||||||
jpeg-dev \
|
|
||||||
llvm9-dev \
|
|
||||||
py3-numpy-dev \
|
py3-numpy-dev \
|
||||||
python3-dev && \
|
python3-dev && \
|
||||||
mkdir -p /app/cache && \
|
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/log/supervisor && \
|
||||||
chmod -R o+rw /var/run && \
|
chmod -R o+rw /var/run && \
|
||||||
pip install -r requirements.txt && \
|
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 --from=builder /app/we-lang /app/bin/we-lang
|
||||||
COPY ./bin /app/bin
|
COPY ./bin /app/bin
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue