forked from tvheadend/tvheadend
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathContainerfile.alpine
More file actions
107 lines (95 loc) · 2.88 KB
/
Containerfile.alpine
File metadata and controls
107 lines (95 loc) · 2.88 KB
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
# SPDX-License-Identifier: GPL-3.0-or-later
#
# Copyright (C) 2023 Olliver Schinagl <oliver@schinagl.nl>
ARG ALPINE_VERSION="latest"
ARG TARGET_ARCH="library"
FROM docker.io/${TARGET_ARCH}/alpine:${ALPINE_VERSION} AS builder
WORKDIR /src
COPY . /src/
RUN apk add --no-cache \
'avahi-dev' \
'bash' \
'bsd-compat-headers' \
'build-base' \
'cmake' \
'coreutils' \
'dbus-dev' \
'findutils' \
'gettext-dev' \
'git' \
'gnu-libiconv-dev' \
'libdvbcsa-dev' \
'libhdhomerun-dev' \
'linux-headers' \
'musl-dev' \
'openssl-dev>3' \
'pcre2' \
'pngquant' \
'python3' \
'uriparser-dev' \
'wget' \
'zlib-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 \
--disable-libav \
--enable-pngquant \
--python=python3 \
&& \
make DESTDIR='/tvheadend' -j$(($(nproc) - 1)) install
FROM docker.io/${TARGET_ARCH}/alpine:${ALPINE_VERSION} AS runner
LABEL maintainer="Olliver Schinagl <oliver@schinagl.nl>"
EXPOSE 9981 \
9982 \
9983
RUN apk add --no-cache \
'avahi' \
'bzip2' \
'dbus-libs' \
'gnu-libiconv-libs' \
'libcrypto3' \
'libdvbcsa' \
'libhdhomerun-libs' \
'libssl3' \
'liburiparser' \
'libva' \
'libvpx' \
'mesa' \
'perl-http-entity-parser' \
'pngquant' \
'pcre2' \
'python3' \
'tini' \
'xmltv' \
'zlib' \
&& \
addgroup -S 'tvheadend' && \
adduser -D -G 'tvheadend' -h '/var/lib/tvheadend' -s '/bin/nologin' -S 'tvheadend' && \
adduser 'tvheadend' 'audio' && \
adduser 'tvheadend' 'video' && \
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 [ "/sbin/tini", "--", "/init" ]