-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile.build-custom
54 lines (46 loc) · 1.92 KB
/
Dockerfile.build-custom
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
# for x86_64 platform use 'alpine:v3.4'
FROM hypriot/rpi-alpine-scratch:v3.4
MAINTAINER netzfisch
# add respositories and check package availability at https://pkgs.alpinelinux.org/packages
RUN echo "http://nl.alpinelinux.org/alpine/v3.4/community" >> /etc/apk/repositories
#RUN echo "@edge http://nl.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories
# install build dependencies, see
# - http://tvheadend.org/projects/tvheadend/wiki/Building,
# - https://github.com/gliderlabs/docker-alpine/issues/24 and
# - http://git.alpinelinux.org/cgit/aports/tree/testing/tvheadend-git/APKBUILD
RUN apk add --update \
ffmpeg-dev gettext-dev libc-dev linux-headers openssl-dev \
perl g++ cmake bash wget bzip2 git make \
libhdhomerun-dev python3 \
findutils bsd-compat-headers \
&& rm -rf /var/cache/apk/*
RUN ln /usr/bin/python3.5 /usr/bin/python
# build tvheadend from master
RUN git clone https://github.com/tvheadend/tvheadend.git /tmp/tvheadend
RUN cd /tmp/tvheadend \
&& ./configure \
--enable-libav \
--enable-hdhomerun_client \
--disable-hdhomerun_static \
--disable-ffmpeg_static \
--disable-libx264_static \
--disable-libx265_static \
--disable-libvpx_static \
--disable-libtheora_static \
--disable-libvorbis_static \
--disable-libfdkaac_static \
--disable-libmfx_static \
&& make -j1 && make install \
&& cd && rm -rf /tmp/*
# remove obselete packages
RUN apk del \
ffmpeg-dev gettext-dev libc-dev linux-headers openssl-dev \
perl g++ cmake bash wget bzip2 git make \
&& apk clean
# expose 'config' and 'recordings' directory for persistence
VOLUME /config /recordings
# expose ports for 'web interface' and 'streaming'
EXPOSE 9981 9982
# enter with '/tmp/tvheadend/build.linux/tvheadend' if 'make install' skipped
ENTRYPOINT ["/usr/bin/tvheadend"]
CMD ["--firstrun", "-u", "root", "-g", "root", "-c", "/config"]