sherlock/Dockerfile
2022-07-07 13:19:09 +02:00

28 lines
687 B
Docker

FROM python:3.10-alpine as build
WORKDIR /wheels
RUN apk add --no-cache \
g++ \
gcc \
git \
libxml2 \
libxml2-dev \
libxslt-dev \
linux-headers
COPY requirements.txt /opt/sherlock/
RUN pip3 wheel -r /opt/sherlock/requirements.txt
FROM python:3.10-alpine
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 -r requirements.txt -f /wheels \
&& rm -rf /wheels \
&& rm -rf /root/.cache/pip/*
WORKDIR /opt/sherlock/sherlock
ENTRYPOINT ["python", "sherlock.py"]