mirror of
https://github.com/sherlock-project/sherlock
synced 2024-11-15 16:47:57 +00:00
d0a1549467
Pip has a "--no-cache-dir" argument to disable caching, eliminating the need of deleting the cache with a hard-coded path.
27 lines
622 B
Docker
27 lines
622 B
Docker
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
|
|
|
|
|
|
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"]
|