One RUN layer less

Every RUN command will create a new layer, and every new layer increases the size of the final image.
This commit is contained in:
Patryk Krawaczyński
2022-10-14 17:44:13 +02:00
committed by GitHub
parent f3db2fb9ce
commit 96a28c7ef2
+3 -4
View File
@@ -1,11 +1,10 @@
FROM python:3.7-slim-bullseye as build
WORKDIR /wheels
RUN apt-get update && apt-get install -y build-essential
COPY requirements.txt /opt/sherlock/
RUN pip3 wheel -r /opt/sherlock/requirements.txt
RUN apt-get update \
&& apt-get install -y build-essential \
&& pip3 wheel -r /opt/sherlock/requirements.txt
FROM python:3.7-slim-bullseye
WORKDIR /opt/sherlock