rawfile-localpv/Dockerfile

31 lines
803 B
Docker
Raw Permalink Normal View History

FROM python:3.10-slim-buster as builder
RUN apt-get update && apt-get install -y build-essential libbtrfsutil-dev
RUN pip wheel -w /wheels "https://github.com/kdave/btrfs-progs/archive/refs/tags/v5.16.1.tar.gz#egg=btrfsutil&subdirectory=libbtrfsutil/python"
2022-02-17 13:56:21 +00:00
FROM python:3.10-slim-buster
2020-04-23 13:48:27 +00:00
WORKDIR /app/
RUN apt-get update && \
apt-get install -y e2fsprogs btrfs-progs libbtrfsutil1 xfsprogs && \
rm -rf /var/lib/apt/lists/*
COPY --from=builder /wheels/ /wheels/
RUN pip install /wheels/*
2020-04-23 13:48:27 +00:00
ENV PIP_NO_CACHE_DIR 1
ADD ./requirements.txt ./
RUN pip install -r ./requirements.txt
ADD ./ ./
ENTRYPOINT ["/usr/bin/env", "python3", "/app/rawfile.py"]
CMD ["csi-driver"]
ENV PYTHONUNBUFFERED 1
ARG IMAGE_TAG
ARG IMAGE_REPOSITORY
ENV IMAGE_REPOSITORY ${IMAGE_REPOSITORY}
ENV IMAGE_TAG ${IMAGE_TAG}