commit
83fe8f0f99
@ -1,4 +1,6 @@
|
|||||||
.git/
|
.git/
|
||||||
.vscode/
|
.vscode/
|
||||||
|
screenshot/
|
||||||
|
tests/
|
||||||
*.txt
|
*.txt
|
||||||
!/requirements.txt
|
!/requirements.txt
|
@ -1,20 +1,27 @@
|
|||||||
FROM python:3.7-alpine as build
|
FROM python:3.7-alpine as build
|
||||||
RUN apk add --no-cache linux-headers g++ gcc libxml2-dev libxml2 libxslt-dev
|
|
||||||
COPY requirements.txt /opt/sherlock/
|
|
||||||
WORKDIR /wheels
|
WORKDIR /wheels
|
||||||
|
RUN apk update --no-cache \
|
||||||
|
&& apk add --no-cache \
|
||||||
|
g++ \
|
||||||
|
gcc \
|
||||||
|
libxml2 \
|
||||||
|
libxml2-dev \
|
||||||
|
libxslt-dev \
|
||||||
|
linux-headers
|
||||||
|
COPY requirements.txt /opt/sherlock/
|
||||||
RUN pip3 wheel -r /opt/sherlock/requirements.txt
|
RUN pip3 wheel -r /opt/sherlock/requirements.txt
|
||||||
|
|
||||||
|
|
||||||
FROM python:3.7-alpine
|
FROM python:3.7-alpine
|
||||||
COPY --from=build /wheels /wheels
|
|
||||||
COPY . /opt/sherlock/
|
|
||||||
WORKDIR /opt/sherlock
|
WORKDIR /opt/sherlock
|
||||||
RUN pip3 install -r requirements.txt -f /wheels \
|
|
||||||
&& rm -rf /wheels \
|
|
||||||
&& rm -rf /root/.cache/pip/*
|
|
||||||
|
|
||||||
ARG VCS_REF
|
ARG VCS_REF
|
||||||
ARG VCS_URL="https://github.com/sherlock-project/sherlock"
|
ARG VCS_URL="https://github.com/sherlock-project/sherlock"
|
||||||
LABEL org.label-schema.vcs-ref=$VCS_REF \
|
LABEL org.label-schema.vcs-ref=$VCS_REF \
|
||||||
org.label-schema.vcs-url=$VCS_URL
|
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/*
|
||||||
|
|
||||||
ENTRYPOINT ["python", "sherlock.py"]
|
ENTRYPOINT ["python", "sherlock.py"]
|
||||||
|
Loading…
Reference in new issue