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

44 lines
855 B
Docker
Raw Permalink Normal View History

2024-03-02 14:18:22 +00:00
ARG version=3.9
2024-03-02 14:17:14 +00:00
ARG tag=${version}-alpine3.19
2024-03-02 11:37:04 +00:00
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
2024-03-02 14:17:14 +00:00
RUN apk add --update ffmpeg netcat-openbsd libusb-dev
2024-03-02 11:37:04 +00:00
COPY . .
RUN pip install . --no-cache-dir
2024-03-02 11:54:33 +00:00
COPY ./docker/entrypoint.sh /entrypoint.sh
2024-03-02 11:37:04 +00:00
2024-03-02 11:56:50 +00:00
ENTRYPOINT ["sh", "/entrypoint.sh"]
2024-03-02 11:37:04 +00:00
CMD ["unifi-cam-proxy"]