2019-01-31 20:45:11 +00:00
|
|
|
FROM python:3.7-alpine as build
|
|
|
|
WORKDIR /wheels
|
2019-12-04 13:59:57 +00:00
|
|
|
RUN apk add --no-cache \
|
2019-07-13 20:18:18 +00:00
|
|
|
g++ \
|
|
|
|
gcc \
|
2019-12-20 14:47:16 +00:00
|
|
|
git \
|
2019-07-13 20:18:18 +00:00
|
|
|
libxml2 \
|
|
|
|
libxml2-dev \
|
|
|
|
libxslt-dev \
|
|
|
|
linux-headers
|
|
|
|
COPY requirements.txt /opt/sherlock/
|
2019-01-31 20:45:11 +00:00
|
|
|
RUN pip3 wheel -r /opt/sherlock/requirements.txt
|
|
|
|
|
2019-07-13 20:18:18 +00:00
|
|
|
|
2018-12-31 20:53:27 +00:00
|
|
|
FROM python:3.7-alpine
|
2019-01-31 20:45:11 +00:00
|
|
|
WORKDIR /opt/sherlock
|
2019-04-24 19:10:57 +00:00
|
|
|
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
|
2019-07-13 20:18:18 +00:00
|
|
|
COPY --from=build /wheels /wheels
|
|
|
|
COPY . /opt/sherlock/
|
|
|
|
RUN pip3 install -r requirements.txt -f /wheels \
|
|
|
|
&& rm -rf /wheels \
|
|
|
|
&& rm -rf /root/.cache/pip/*
|
2020-07-21 21:52:41 +00:00
|
|
|
WORKDIR /opt/sherlock/sherlock
|
2019-04-24 19:10:57 +00:00
|
|
|
|
2019-01-31 20:45:11 +00:00
|
|
|
ENTRYPOINT ["python", "sherlock.py"]
|