Files
simply-dvb/Dockerfile
T
Mateusz Gruszczyński c30064b531
build / test (push) Canceled after 0s
build / deb (amd64) (push) Canceled after 0s
build / deb (arm64) (push) Canceled after 0s
build / deb (armhf) (push) Canceled after 0s
first commit
2026-11-16 16:19:21 +01:00

37 lines
1.5 KiB
Docker
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# syntax=docker/dockerfile:1
FROM rust:1-trixie AS build
WORKDIR /build
COPY Cargo.toml Cargo.lock build.rs ./
COPY migrations ./migrations
COPY langs ./langs
COPY src ./src
COPY web ./web
RUN cargo build --locked --release && strip target/release/simply-dvb
FROM debian:trixie-slim AS runtime
# ffmpeg – optional transcoding profiles (audio→AAC, HEVC→H.264) for browsers
RUN apt-get update \
&& apt-get install -y --no-install-recommends ca-certificates ffmpeg tzdata \
&& rm -rf /var/lib/apt/lists/* \
&& groupadd --system --gid 10001 simply-dvb \
&& useradd --system --uid 10001 --gid simply-dvb --home /var/lib/simply-dvb --shell /usr/sbin/nologin simply-dvb \
&& install -d -o simply-dvb -g simply-dvb -m 0750 /var/lib/simply-dvb
COPY --from=build /build/target/release/simply-dvb /usr/local/bin/simply-dvb
# Set TZ to your local zone (e.g. -e TZ=Europe/Berlin) so EPG times and recordings match.
ENV RUST_LOG=simply_dvb=info,warn \
SIMPLY_DVB_DATA_DIR=/var/lib/simply-dvb \
SIMPLY_DVB_LISTEN=0.0.0.0:9980 \
SIMPLY_DVB_STREAM_LISTEN=0.0.0.0:9981 \
SIMPLY_DVB_HTSP_LISTEN=0.0.0.0:9982 \
TZ=Etc/UTC
# Access to /dev/dvb needs the host's "video" group: docker run --group-add $(getent group video | cut -d: -f3)
USER simply-dvb:simply-dvb
VOLUME ["/var/lib/simply-dvb"]
EXPOSE 9980 9981 9982
HEALTHCHECK --interval=30s --timeout=5s CMD ["/bin/sh", "-c", "exec 3<>/dev/tcp/127.0.0.1/9980 && printf 'GET /healthz HTTP/1.0\\r\\n\\r\\n' >&3 && grep -q ok <&3"]
ENTRYPOINT ["/usr/local/bin/simply-dvb"]
CMD ["serve"]