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
848 B
Docker
Raw Normal View History

2024-03-02 11:37:04 +00:00
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
2024-03-02 14:13:56 +00:00
RUN apk add --update 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"]