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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 4 deletions

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