forked from tvheadend/tvheadend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Containerfile.debian
122 lines (108 loc) · 3.33 KB
/
Containerfile.debian
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
# SPDX-License-Identifier: GPL-3.0-or-later
#
# Copyright (C) 2023 Olliver Schinagl <oliver@schinagl.nl>
ARG DEBIAN_VERSION="stable-slim"
ARG TARGET_ARCH="library"
FROM docker.io/${TARGET_ARCH}/debian:${DEBIAN_VERSION} AS builder
ENV DEBIAN_FRONTEND noninteractive
WORKDIR /src
COPY . /src/
RUN apt-get update --yes && apt-get install --yes \
'build-essential' \
'bzip2' \
'cmake' \
'debhelper' \
'gettext' \
'git-core' \
'libavahi-client-dev' \
'libavdevice-dev' \
'libdbus-1-dev' \
'libdvbcsa-dev' \
'libhdhomerun-dev' \
'libopus-dev' \
'libpcre2-dev' \
'libssl-dev' \
'liburiparser-dev' \
'libva-dev' \
'libvpx-dev' \
'libx264-dev' \
'libx265-dev' \
'lsb-release' \
'pkg-config' \
'pngquant' \
'python3' \
'python3-distutils-extra' \
'python3-requests' \
'wget' \
'zlib1g-dev' \
&& \
git config --global --add safe.directory '/src/data/dvb-scan' && \
./configure \
--prefix='/usr/local' \
--disable-doc \
--disable-execinfo \
--disable-ffmpeg_static \
--disable-hdhomerun_static \
--disable-libfdkaac_static \
--disable-libmfx_static \
--disable-libopus_static \
--disable-libtheora_static \
--disable-libvorbis_static \
--disable-libvpx_static \
--disable-libx264_static \
--disable-libx265_static \
--enable-bundle \
--enable-dvbcsa \
--enable-hdhomerun_client \
--enable-kqueue \
--enable-libav \
--enable-nvenc \
--enable-pngquant \
--enable-qsv \
--python=python3 \
&& \
make DESTDIR='/tvheadend' -j$(($(nproc) - 1)) install
FROM docker.io/${TARGET_ARCH}/debian:${DEBIAN_VERSION}
ENV DEBIAN_FRONTEND noninteractive
LABEL maintainer="Olliver Schinagl <oliver@schinagl.nl>"
EXPOSE 9981 \
9982 \
9983
RUN apt-get update --yes && apt-get install --yes \
'libavahi-client3' \
'libavcodec59' \
'libavdevice59' \
'libavfilter8' \
'libavfilter8' \
'libavutil57' \
'libdbus-1-3' \
'libdvbcsa1' \
'libhdhomerun4' \
'libpostproc56' \
'libswscale6' \
'libopus0' \
'libpcre2-8-0' \
'libssl3' \
'liburiparser1' \
'libva2' \
'libvpx7' \
'libx264-164' \
'libx265-199' \
'pngquant' \
'python3' \
'mesa-va-drivers' \
'mesa-vdpau-drivers' \
'zlib1g' \
'xmltv' \
'tini' \
&& \
useradd -c 'TVHeadend' -d '/var/lib/tvheadend' -G 'audio','video' -m -r -s '/bin/false' -U 'tvheadend' && \
install -d -m 775 -g 'tvheadend' -o 'tvheadend' '/var/lib/tvheadend/recordings' && \
install -d -m 775 -g 'tvheadend' -o 'tvheadend' '/var/log/tvheadend'
COPY --from=builder "/tvheadend" "/"
COPY "./support/container-entrypoint.sh" "/init"
VOLUME /var/lib/tvheadend
VOLUME /var/lib/tvheadend/recordings
WORKDIR /var/lib/tvheadend/
USER tvheadend
ENTRYPOINT [ "/usr/bin/tini", "--", "/init" ]