This repository has been archived on 2024-03-03. You can view files and clone it, but cannot push or open issues or pull requests.
unifi-cam-proxy/Dockerfile
Liam 8e47a1e896
All checks were successful
Build Docker image / docker (push) Successful in 1m27s
i hate coding
2024-03-02 11:56:50 +00:00

44 lines
855 B
Docker

ARG version=3.9
ARG tag=${version}-alpine3.17
FROM python:${tag} as builder
WORKDIR /app
ENV CARGO_NET_GIT_FETCH_WITH_CLI=true
RUN apk add --update \
cargo \
git \
gcc \
g++ \
jpeg-dev \
libc-dev \
linux-headers \
musl-dev \
patchelf \
rust \
zlib-dev
RUN pip install -U pip wheel setuptools maturin
COPY requirements.txt .
RUN pip install -r requirements.txt --no-build-isolation
FROM python:${tag}
WORKDIR /app
ARG version
COPY --from=builder \
/usr/local/lib/python${version}/site-packages \
/usr/local/lib/python${version}/site-packages
RUN apk add --update ffmpeg netcat-openbsd libusb-dev
COPY . .
RUN pip install . --no-cache-dir
COPY ./docker/entrypoint.sh /entrypoint.sh
ENTRYPOINT ["sh", "/entrypoint.sh"]
CMD ["unifi-cam-proxy"]