sherlock/Dockerfile
Patryk Krawaczyński 96a28c7ef2
One RUN layer less
Every RUN command will create a new layer, and every new layer increases the size of the final image.
2022-10-14 17:44:13 +02:00

26 lines
627 B
Docker

FROM python:3.7-slim-bullseye as build
WORKDIR /wheels
COPY requirements.txt /opt/sherlock/
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
ARG VCS_REF
ARG VCS_URL="https://github.com/sherlock-project/sherlock"
LABEL org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.vcs-url=$VCS_URL
COPY --from=build /wheels /wheels
COPY . /opt/sherlock/
RUN pip3 install --no-cache-dir -r requirements.txt -f /wheels \
&& rm -rf /wheels
WORKDIR /opt/sherlock/sherlock
ENTRYPOINT ["python", "sherlock.py"]