Merge pull request #1479 from NeoLight1010/fix-docker-debian

Fix docker image build
pull/1423/merge
Siddharth Dushantha 2 years ago committed by GitHub
commit 4ed6c1060a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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

Loading…
Cancel
Save