2021-10-17 14:11:32 +02:00
|
|
|
## Get Code and make
|
2025-09-14 20:52:29 +00:00
|
|
|
FROM debian:trixie-slim AS build
|
2021-10-17 14:11:32 +02:00
|
|
|
|
|
|
|
|
ARG REPO=https://github.com/pikvm/ustreamer
|
|
|
|
|
ARG VERSION=master
|
|
|
|
|
|
|
|
|
|
WORKDIR /opt
|
|
|
|
|
|
|
|
|
|
RUN apt update \
|
|
|
|
|
&& apt install -y \
|
|
|
|
|
ca-certificates \
|
|
|
|
|
make \
|
|
|
|
|
gcc \
|
|
|
|
|
git \
|
|
|
|
|
libevent-dev \
|
|
|
|
|
libjpeg62-turbo-dev \
|
|
|
|
|
libbsd-dev \
|
|
|
|
|
libgpiod-dev \
|
2024-08-17 11:31:23 +02:00
|
|
|
pkg-config \
|
2021-10-17 14:11:32 +02:00
|
|
|
&& apt clean
|
|
|
|
|
|
|
|
|
|
RUN git clone ${REPO} ustreamer \
|
|
|
|
|
&& cd ustreamer \
|
2022-12-01 21:47:14 +01:00
|
|
|
&& git checkout ${VERSION} \
|
|
|
|
|
&& rm -rf .git
|
2021-10-17 14:11:32 +02:00
|
|
|
|
|
|
|
|
RUN cd ustreamer \
|
2024-03-02 22:06:19 +01:00
|
|
|
&& make LDFLAGS=-latomic
|
2021-10-17 14:11:32 +02:00
|
|
|
|
|
|
|
|
## Runtime Image
|
2025-09-14 20:52:29 +00:00
|
|
|
FROM debian:trixie-slim AS run
|
2021-10-17 14:11:32 +02:00
|
|
|
|
|
|
|
|
RUN apt update \
|
|
|
|
|
&& apt install -y \
|
|
|
|
|
ca-certificates \
|
2025-09-19 09:26:42 +02:00
|
|
|
libevent-2.1-7t64 \
|
|
|
|
|
libevent-pthreads-2.1-7t64 \
|
2021-10-17 14:11:32 +02:00
|
|
|
libjpeg62-turbo \
|
|
|
|
|
libbsd0 \
|
2025-09-19 09:26:42 +02:00
|
|
|
libgpiod3 \
|
2024-02-29 20:51:01 +01:00
|
|
|
v4l-utils \
|
2024-11-11 23:03:40 +01:00
|
|
|
curl \
|
|
|
|
|
jq \
|
2021-10-17 14:11:32 +02:00
|
|
|
&& apt clean
|
|
|
|
|
|
|
|
|
|
WORKDIR /opt
|
|
|
|
|
RUN groupadd ustreamer --gid 1000 \
|
|
|
|
|
&& useradd ustreamer --uid 1000 --gid ustreamer \
|
2022-12-01 21:47:14 +01:00
|
|
|
&& usermod ustreamer --append --groups video
|
|
|
|
|
|
2024-11-11 23:03:40 +01:00
|
|
|
COPY --chown=ustreamer:ustreamer health.sh ./
|
|
|
|
|
|
2024-03-01 08:30:48 +01:00
|
|
|
COPY --chown=ustreamer:ustreamer --from=build /opt/ustreamer/src/ustreamer.bin ./ustreamer
|
2021-10-17 14:11:32 +02:00
|
|
|
|
2021-10-20 23:18:43 +02:00
|
|
|
## Start ustreamer
|
2021-10-17 14:11:32 +02:00
|
|
|
USER ustreamer
|
2021-10-20 23:18:43 +02:00
|
|
|
EXPOSE 8080
|
2024-11-11 23:03:40 +01:00
|
|
|
ENTRYPOINT ["/opt/ustreamer"]
|
2021-10-20 23:18:43 +02:00
|
|
|
CMD ["--host=0.0.0.0", "--port=8080"]
|
|
|
|
|
|