File tree Expand file tree Collapse file tree 2 files changed +12
-10
lines changed Expand file tree Collapse file tree 2 files changed +12
-10
lines changed Original file line number Diff line number Diff line change 2929COPY requirements.txt ./
3030# CPUCOUNT=1 is needed, otherwise the wheel for uwsgi won't always be build succesfully
3131# https://github.com/unbit/uwsgi/issues/1318#issuecomment-542238096
32- RUN CPUCOUNT=1 pip3 wheel --wheel-dir=/tmp/wheels -r ./requirements.txt
32+ RUN export PYCURL_SSL_LIBRARY=openssl && \
33+ CPUCOUNT=1 pip3 wheel --wheel-dir=/tmp/wheels -r ./requirements.txt
3334
3435FROM base AS release
3536WORKDIR /app
@@ -55,10 +56,10 @@ RUN \
5556 && \
5657 rm -rf /var/cache/apk/* && \
5758 true
58- COPY --from=build /tmp/wheels /tmp/wheels
59- COPY requirements.txt ./
60- RUN export PYCURL_SSL_LIBRARY=openssl && \
61- pip3 install \
59+ RUN \
60+ --mount=from=build,src=/tmp/wheels,target=/tmp/wheels \
61+ --mount=from=build,src=/app/requirements.txt,target=/app/requirements.txt \
62+ pip3 install \
6263 --no-cache-dir \
6364 --no-index \
6465 --find-links=/tmp/wheels \
Original file line number Diff line number Diff line change 2828COPY requirements.txt ./
2929# CPUCOUNT=1 is needed, otherwise the wheel for uwsgi won't always be build succesfully
3030# https://github.com/unbit/uwsgi/issues/1318#issuecomment-542238096
31- RUN CPUCOUNT=1 pip3 wheel --wheel-dir=/tmp/wheels -r ./requirements.txt
31+ RUN export PYCURL_SSL_LIBRARY=openssl && \
32+ CPUCOUNT=1 pip3 wheel --wheel-dir=/tmp/wheels -r ./requirements.txt
3233
3334FROM base AS release
3435WORKDIR /app
@@ -58,10 +59,10 @@ RUN \
5859 apt-get clean && \
5960 rm -rf /var/lib/apt/lists && \
6061 true
61- COPY --from=build /tmp/wheels /tmp/wheels
62- COPY requirements.txt ./
63- RUN export PYCURL_SSL_LIBRARY=openssl && \
64- pip3 install \
62+ RUN \
63+ --mount=from=build,src=/tmp/wheels,target=/tmp/wheels \
64+ --mount=from=build,src=/app/requirements.txt,target=/app/requirements.txt \
65+ pip3 install \
6566 --no-cache-dir \
6667 --no-index \
6768 --find-links=/tmp/wheels \
You can’t perform that action at this time.
0 commit comments