Closed alexricher closed 10 years ago
Hey Alex. This Docker file doesn't actually put TVHeadend into a Docker container. It's only purpose is to build Debian/Ubuntu packages out of the most recent source code. I whipped it together because there wasn't any PPA and I could find any other binaries of the bleeding-edge TVHeadend. I used this Dockerfile to just build *.deb files that I then just installed on a standard Ubuntu system.
So, I think think it's going to do what you are looking for... and as a side note, looks like it isn't building the *.deb's properly right now for some reason. I'm not actually using TVHeadend right now, since I wasn't able to get it to work with my current hardware (a HDHomerun Prime + CableCard). Sorry :(
Hi arionl,
Thanks for getting back to me and for the precision regarding your Docker file. :) I probably was mislead by the name "Docker". Tvheadend seems to require a lot of efforts to get it properly working but from what I've gathered, it may be worth it depending on your hardware. I initially got it working under Unraid without Dockers but it required recompiling the kernel and it's kind of a pain; hence why I'm now turning to Docker. I couldn't find anything online until I've found your repo on github. If I have some spare time in a near future, I may try to take what you've done and get it properly working inside a genuine Docker file... But only time will tell. :)
Thansk and have yourself a good day!
Alex
Good day arionl!
Thanks for making a Docker file of Tvheadend! I'm a Unraid user and they've added Dockers support so I've starting using some of them. One that is still missing to the docker registry is tvheadend and you've just filled the gap! :)
I've tried installing your docker manually. I get to build it fine but once I attempt to start it, I get an error: dpkg-genchanges: error: cannot read ../tvheadend_3.9-1800-gddeb002.dsc: No such file or directory
Here's what I did to get it working:
build it
docker build --tag="tvheadend" /boot/dockers/tvheadend/ // -> #This is where I've downloaded your Docker file
Up to that point, I get the docker image/container created, takes a while to download everything and build. Then, I attempt to start it.
start it
/usr/bin/docker run -d --name="tvheadend" --net="bridge" --privileged="true" -e TZ="America/New_York" -p 9981:9981/tcp -p 9982:9982/tcp -v "/mnt/cache/appdata/tvheadend.docker":"/data":rw -v "/mnt/cache/appdata/tvheadend.docker/records":"/records":rw tvheadend
Sadly, that's the part that seems to fail... Here is my full logs:
Tvheadend Data Directory: /usr/share/tvheadend
make[1]: Leaving directory
/opt/tvheadend' debian/rules override_dh_auto_build make[1]: Entering directory
/opt/tvheadend' make make[2]: Entering directory/opt/tvheadend' Receiving data/dvb-scan/dvb-t from http://linuxtv.org/git/dtv-scan-tables.git CC src/version.o CC src/uuid.o CC src/main.o CC src/tvhlog.o CC src/idnode.o CC src/prop.o CC src/utils.o CC src/wrappers.o CC src/access.o CC src/tcp.o CC src/udp.o CC src/url.o CC src/http.o CC src/notify.o CC src/file.o CC src/epg.o CC src/epgdb.o CC src/epggrab.o CC src/spawn.o CC src/packet.o CC src/streaming.o CC src/channels.o CC src/subscriptions.o CC src/service.o CC src/htsp_server.o CC src/htsmsg.o CC src/htsmsg_binary.o CC src/htsmsg_json.o CC src/htsmsg_xml.o CC src/misc/dbl.o CC src/misc/json.o CC src/settings.o CC src/htsbuf.o CC src/trap.o CC src/avg.o CC src/htsstr.o CC src/tvhpoll.o CC src/huffman.o CC src/filebundle.o CC src/config.o CC src/lang_codes.o CC src/lang_str.o CC src/imagecache.o CC src/tvhtime.o CC src/service_mapper.o CC src/input.o CC src/httpc.o CC src/rtsp.o CC src/fsmonitor.o CC src/cron.o CC src/esfilter.o CC src/intlconv.o CC src/profile.o CC src/api.o CC src/api/api_status.o CC src/api/api_idnode.o CC src/api/api_input.o CC src/api/api_channel.o CC src/api/api_service.o CC src/api/api_mpegts.o CC src/api/api_epg.o CC src/api/api_epggrab.o CC src/api/api_imagecache.o CC src/api/api_esfilter.o CC src/api/api_intlconv.o CC src/api/api_access.o CC src/api/api_dvr.o CC src/api/api_caclient.o CC src/api/api_profile.o CC src/parsers/parsers.o CC src/parsers/bitstream.o CC src/parsers/parser_h264.o CC src/parsers/parser_latm.o CC src/parsers/parser_avc.o CC src/parsers/parser_teletext.o CC src/epggrab/module.o CC src/epggrab/channel.o CC src/epggrab/module/pyepg.o CC src/epggrab/module/xmltv.o CC src/plumbing/tsfix.o CC src/plumbing/globalheaders.o CC src/dvr/dvr_db.o CC src/dvr/dvr_rec.o CC src/dvr/dvr_autorec.o CC src/dvr/dvr_timerec.o CC src/dvr/dvr_config.o CC src/dvr/dvr_cutpoints.o CC src/webui/webui.o CC src/webui/comet.o CC src/webui/extjs.o CC src/webui/simpleui.o CC src/webui/statedump.o CC src/webui/html.o CC src/webui/webui_api.o CC src/muxer.o CC src/muxer/muxer_pass.o CC src/muxer/muxer_tvh.o CC src/muxer/tvh/ebml.o CC src/muxer/tvh/mkmux.o CC src/upnp.o CC src/descrambler/descrambler.o CC src/descrambler/caclient.o CC src/input/mpegts.o CC src/input/mpegts/mpegts_input.o CC src/input/mpegts/mpegts_network.o CC src/input/mpegts/mpegts_mux.o CC src/input/mpegts/mpegts_service.o CC src/input/mpegts/mpegts_table.o CC src/input/mpegts/dvb_support.o CC src/input/mpegts/dvb_charset.o CC src/input/mpegts/dvb_psi.o CC src/input/mpegts/tsdemux.o CC src/input/mpegts/mpegts_mux_sched.o CC src/input/mpegts/mpegts_network_scan.o CC src/input/mpegts/mpegts_network_dvb.o CC src/input/mpegts/mpegts_mux_dvb.o CC src/input/mpegts/scanfile.o CC src/epggrab/otamux.o CC src/epggrab/module/eit.o CC src/epggrab/support/freesat_huffman.o CC src/epggrab/module/opentv.o CC src/input/mpegts/linuxdvb/linuxdvb.o CC src/input/mpegts/linuxdvb/linuxdvb_adapter.o CC src/input/mpegts/linuxdvb/linuxdvb_frontend.o CC src/input/mpegts/linuxdvb/linuxdvb_satconf.o CC src/input/mpegts/linuxdvb/linuxdvb_lnb.o CC src/input/mpegts/linuxdvb/linuxdvb_switch.o CC src/input/mpegts/linuxdvb/linuxdvb_rotor.o CC src/input/mpegts/linuxdvb/linuxdvb_en50494.o CC src/input/mpegts/satip/satip.o CC src/input/mpegts/satip/satip_frontend.o CC src/input/mpegts/satip/satip_satconf.o CC src/input/mpegts/satip/satip_rtsp.o CC src/input/mpegts/iptv/iptv.o CC src/input/mpegts/iptv/iptv_mux.o CC src/input/mpegts/iptv/iptv_service.o CC src/input/mpegts/iptv/iptv_http.o CC src/input/mpegts/iptv/iptv_udp.o CC src/input/mpegts/tsfile/tsfile.o CC src/input/mpegts/tsfile/tsfile_input.o CC src/input/mpegts/tsfile/tsfile_mux.o CC src/timeshift.o CC src/timeshift/timeshift_filemgr.o CC src/timeshift/timeshift_writer.o CC src/timeshift/timeshift_reader.o CC src/dvr/dvr_inotify.o CC src/avahi.o CC src/descrambler/tvhcsa.o CC src/descrambler/cwc.o CC src/descrambler/capmt.o CC src/descrambler/constcw.o CC src/descrambler/ffdecsa/ffdecsa_interface.o CC src/descrambler/ffdecsa/ffdecsa_int.o CC src/descrambler/ffdecsa/ffdecsa_mmx.o CC src/descrambler/ffdecsa/ffdecsa_sse2.o CC src/descrambler/libaesdec/libaesdec.o CC src/dbus.o CC tvheadend make[2]: Leaving directory
/opt/tvheadend' make[1]: Leaving directory/opt/tvheadend' dh_auto_test debian/rules binary dh binary dh_testroot dh_prep rm -f debian/tvheadend.substvars rm -f debian/tvheadend.*.debhelper rm -rf debian/tvheadend/ rm -f debian/tvheadend-dbg.substvars rm -f debian/tvheadend-dbg.*.debhelper rm -rf debian/tvheadend-dbg/ dh_installdirs install -d debian/tvheadend install -d debian/tvheadend/usr/bin install -d debian/tvheadend-dbg debian/rules override_dh_auto_install make[1]: Entering directory
/opt/tvheadend' dh_auto_install --destdir=debian/tvheadend make -j1 install DESTDIR=/opt/tvheadend/debian/tvheadend AM_UPDATE_INFO_DIR=no make[2]: Entering directory/opt/tvheadend' CC tvheadend install -d /opt/tvheadend/debian/tvheadend/usr/bin install /opt/tvheadend/build.linux/tvheadend /opt/tvheadend/debian/tvheadend/usr/bin/tvheadend install -d /opt/tvheadend/debian/tvheadend/usr/share/man/man1 install /opt/tvheadend/man/tvheadend.1 /opt/tvheadend/debian/tvheadend/usr/share/man/man1/tvheadend.1 done find /opt/tvheadend/debian/tvheadend/usr/share/tvheadend -name .git -exec rm -rf {} ; &>/dev/null || /bin/true make[2]: Leaving directory
/opt/tvheadend' make[1]: Leaving directory/opt/tvheadend' dh_installdocs install -g 0 -o 0 -d debian/tvheadend/usr/share/doc/tvheadend cp -a README.md debian/tvheadend/usr/share/doc/tvheadend cp -a LICENSE.md debian/tvheadend/usr/share/doc/tvheadend chown -R 0:0 debian/tvheadend/usr/share/doc chmod -R go=rX debian/tvheadend/usr/share/doc chmod -R u+rw debian/tvheadend/usr/share/doc install -g 0 -o 0 -m 644 -p debian/copyright debian/tvheadend/usr/share/doc/tvheadend/copyright install -g 0 -o 0 -d debian/tvheadend-dbg/usr/share/doc/tvheadend-dbg install -g 0 -o 0 -m 644 -p debian/copyright debian/tvheadend-dbg/usr/share/doc/tvheadend-dbg/copyright dh_installchangelogs install -o 0 -g 0 -p -m644 debian/changelog debian/tvheadend/usr/share/doc/tvheadend/changelog.Debian install -o 0 -g 0 -p -m644 debian/changelog debian/tvheadend-dbg/usr/share/doc/tvheadend-dbg/changelog.Debian dh_installman man --recode UTF-8 ./tvheadend.1 > tvheadend.1.new chmod 644 tvheadend.1.new mv -f tvheadend.1.new tvheadend.1 dh_installdebconf install -o 0 -g 0 -d debian/tvheadend/DEBIAN sed s/#DEBHELPER#// < debian/tvheadend.config > debian/tvheadend/DEBIAN/config chown 0:0 debian/tvheadend/DEBIAN/config chmod 755 debian/tvheadend/DEBIAN/config install -o 0 -g 0 -m 644 -p debian/tvheadend.templates debian/tvheadend/DEBIAN/templates (grep -s -v misc:Depends debian/tvheadend.substvars; echo "misc:Depends=debconf (>= 0.5) | debconf-2.0") > debian/tvheadend.substvars.new mv debian/tvheadend.substvars.new debian/tvheadend.substvars echo "# Automatically added by dh_installdebconf">> debian/tvheadend.postrm.debhelper sed "" /usr/share/debhelper/autoscripts/postrm-debconf >> debian/tvheadend.postrm.debhelper echo '# End automatically added section' >> debian/tvheadend.postrm.debhelper install -o 0 -g 0 -d debian/tvheadend-dbg/DEBIAN dh_installinit install -d debian/tvheadend/etc/init install -p -m644 debian/tvheadend.upstart debian/tvheadend/etc/init/tvheadend.conf install -d debian/tvheadend/etc/default install -p -m644 debian/tvheadend.default debian/tvheadend/etc/default/tvheadend (grep -s -v misc:Depends debian/tvheadend.substvars; echo "misc:Depends=debconf (>= 0.5) | debconf-2.0, sysv-rc (>= 2.88dsf-24) | file-rc (>= 0.8.16)") > debian/tvheadend.substvars.new mv debian/tvheadend.substvars.new debian/tvheadend.substvars install -d debian/tvheadend/etc/init.d install -p -m755 debian/tvheadend.init debian/tvheadend/etc/init.d/tvheadend echo "# Automatically added by dh_installinit">> debian/tvheadend.postinst.debhelper sed "s/#SCRIPT#/tvheadend/g;s/#INITPARMS#/defaults/;s/#ERROR_HANDLER#/exit $?/" /usr/share/debhelper/autoscripts/postinst-init >> debian/tvheadend.postinst.debhelper echo '# End automatically added section' >> debian/tvheadend.postinst.debhelper echo "# Automatically added by dh_installinit">> debian/tvheadend.prerm.debhelper sed "s/#SCRIPT#/tvheadend/g;s/#INITPARMS#/defaults/;s/#ERROR_HANDLER#/exit $?/" /usr/share/debhelper/autoscripts/prerm-init >> debian/tvheadend.prerm.debhelper echo '# End automatically added section' >> debian/tvheadend.prerm.debhelper echo "# Automatically added by dh_installinit">> debian/tvheadend.preinst.debhelper sed "s!#OLD#!/etc/init.d/tvheadend!g;s!#PACKAGE#!tvheadend!g" /usr/share/debhelper/autoscripts/preinst-upstart-compatibility >> debian/tvheadend.preinst.debhelper echo '# End automatically added section' >> debian/tvheadend.preinst.debhelper echo "# Automatically added by dh_installinit">> debian/tvheadend.postinst.debhelper sed "s/#SCRIPT#/tvheadend/g;s/#ERROR_HANDLER#/exit $?/" /usr/share/debhelper/autoscripts/postinst-upstart-replace >> debian/tvheadend.postinst.debhelper echo '# End automatically added section' >> debian/tvheadend.postinst.debhelper dh_perl dh_link dh_compress cd debian/tvheadend chmod a-x usr/share/man/man1/tvheadend.1 usr/share/doc/tvheadend/changelog.Debian gzip -9nf usr/share/man/man1/tvheadend.1 usr/share/doc/tvheadend/changelog.Debian cd '/opt/tvheadend' cd debian/tvheadend-dbg chmod a-x usr/share/doc/tvheadend-dbg/changelog.Debian gzip -9nf usr/share/doc/tvheadend-dbg/changelog.Debian cd '/opt/tvheadend' dh_fixperms find debian/tvheadend -print0 2>/dev/null | xargs -0r chown --no-dereference 0:0 find debian/tvheadend ! -type l -print0 2>/dev/null | xargs -0r chmod go=rX,u+rw,a-s find debian/tvheadend/usr/share/doc -type f ! -regex 'debian/tvheadend/usr/share/doc/[^/]*/examples/.*' -print0 2>/dev/null | xargs -0r chmod 644 find debian/tvheadend/usr/share/doc -type d -print0 2>/dev/null | xargs -0r chmod 755 find debian/tvheadend/usr/share/man debian/tvheadend/usr/man/ debian/tvheadend/usr/X11*/man/ -type f -print0 2>/dev/null | xargs -0r chmod 644 find debian/tvheadend -perm -5 -type f ( -name '*.so.*' -or -name '*.so' -or -name '*.la' -or -name '*.a' ) -print0 2>/dev/null | xargs -0r chmod 644 find debian/tvheadend/usr/include -type f -print0 2>/dev/null | xargs -0r chmod 644 find debian/tvheadend/usr/share/applications -type f -print0 2>/dev/null | xargs -0r chmod 644 find debian/tvheadend -perm -5 -type f ( -name '*.cmxs' ) -print0 2>/dev/null | xargs -0r chmod 644 find debian/tvheadend/usr/lib/perl5 debian/tvheadend/usr/share/perl5 -type f -perm -5 -name '*.pm' -print0 2>/dev/null | xargs -0r chmod a-X find debian/tvheadend/usr/bin -type f -print0 2>/dev/null | xargs -0r chmod a+x find debian/tvheadend/etc/init.d -type f -print0 2>/dev/null | xargs -0r chmod a+x find debian/tvheadend/usr/lib -type f -name '*.ali' -print0 2>/dev/null | xargs -0r chmod uga-w find debian/tvheadend-dbg -print0 2>/dev/null | xargs -0r chown --no-dereference 0:0 find debian/tvheadend-dbg ! -type l -print0 2>/dev/null | xargs -0r chmod go=rX,u+rw,a-s find debian/tvheadend-dbg/usr/share/doc -type f ! -regex 'debian/tvheadend-dbg/usr/share/doc/[^/]*/examples/.*' -print0 2>/dev/null | xargs -0r chmod 644 find debian/tvheadend-dbg/usr/share/doc -type d -print0 2>/dev/null | xargs -0r chmod 755 find debian/tvheadend-dbg/usr/share/man debian/tvheadend-dbg/usr/man/ debian/tvheadend-dbg/usr/X11*/man/ -type f -print0 2>/dev/null | xargs -0r chmod 644 find debian/tvheadend-dbg -perm -5 -type f ( -name '*.so.*' -or -name '*.so' -or -name '*.la' -or -name '*.a' ) -print0 2>/dev/null | xargs -0r chmod 644 find debian/tvheadend-dbg/usr/include -type f -print0 2>/dev/null | xargs -0r chmod 644 find debian/tvheadend-dbg/usr/share/applications -type f -print0 2>/dev/null | xargs -0r chmod 644 find debian/tvheadend-dbg -perm -5 -type f ( -name '*.cmxs' ) -print0 2>/dev/null | xargs -0r chmod 644 find debian/tvheadend-dbg/usr/lib/perl5 debian/tvheadend-dbg/usr/share/perl5 -type f -perm -5 -name '*.pm' -print0 2>/dev/null | xargs -0r chmod a-X find debian/tvheadend-dbg/usr/lib -type f -name '*.ali' -print0 2>/dev/null | xargs -0r chmod uga-w debian/rules override_dh_strip make[1]: Entering directory
/opt/tvheadend' dh_strip --dbg-package=tvheadend-dbg install -d debian/tvheadend-dbg/usr/lib/debug//usr/bin objcopy --only-keep-debug debian/tvheadend/usr/bin/tvheadend debian/tvheadend-dbg/usr/lib/debug//usr/bin/tvheadend chmod 644 debian/tvheadend-dbg/usr/lib/debug//usr/bin/tvheadend strip --remove-section=.comment --remove-section=.note debian/tvheadend/usr/bin/tvheadend objcopy --add-gnu-debuglink debian/tvheadend-dbg/usr/lib/debug//usr/bin/tvheadend debian/tvheadend/usr/bin/tvheadend make[1]: Leaving directory/opt/tvheadend' dh_makeshlibs rm -f debian/tvheadend/DEBIAN/shlibs rm -f debian/tvheadend-dbg/DEBIAN/shlibs dh_shlibdeps dpkg-shlibdeps -Tdebian/tvheadend.substvars debian/tvheadend/usr/bin/tvheadend dh_installdeb perl -pe 's~#DEBHELPER#~qx{cat debian/tvheadend.postinst.debhelper}~eg' < debian/tvheadend.postinst > debian/tvheadend/DEBIAN/postinst chown 0:0 debian/tvheadend/DEBIAN/postinst chmod 755 debian/tvheadend/DEBIAN/postinst printf '#!/bin/sh set -e ' > debian/tvheadend/DEBIAN/preinst cat debian/tvheadend.preinst.debhelper >> debian/tvheadend/DEBIAN/preinst chown 0:0 debian/tvheadend/DEBIAN/preinst chmod 755 debian/tvheadend/DEBIAN/preinst printf '#!/bin/sh set -e ' > debian/tvheadend/DEBIAN/prerm cat debian/tvheadend.prerm.debhelper >> debian/tvheadend/DEBIAN/prerm chown 0:0 debian/tvheadend/DEBIAN/prerm chmod 755 debian/tvheadend/DEBIAN/prerm perl -pe 's~#DEBHELPER#~qx{cat debian/tvheadend.postrm.debhelper}~eg' < debian/tvheadend.postrm > debian/tvheadend/DEBIAN/postrm chown 0:0 debian/tvheadend/DEBIAN/postrm chmod 755 debian/tvheadend/DEBIAN/postrm find debian/tvheadend/etc -type f -printf '/etc/%P ' >> debian/tvheadend/DEBIAN/conffiles chmod 644 debian/tvheadend/DEBIAN/conffiles dh_gencontrol dpkg-gencontrol -ptvheadend -ldebian/changelog -Tdebian/tvheadend.substvars -Pdebian/tvheadend dpkg-gencontrol: warning: File::FcntlLock not available; using flock which is not NFS-safe dpkg-gencontrol: warning: package tvheadend: unused substitution variable ${misc:Depends} chmod 644 debian/tvheadend/DEBIAN/control chown 0:0 debian/tvheadend/DEBIAN/control echo misc:Depends= >> debian/tvheadend-dbg.substvars dpkg-gencontrol -ptvheadend-dbg -ldebian/changelog -Tdebian/tvheadend-dbg.substvars -Pdebian/tvheadend-dbg dpkg-gencontrol: warning: File::FcntlLock not available; using flock which is not NFS-safe chmod 644 debian/tvheadend-dbg/DEBIAN/control chown 0:0 debian/tvheadend-dbg/DEBIAN/control dh_md5sums (cd debian/tvheadend >/dev/null ; find . -type f ! -path "./etc/init/tvheadend.conf" ! -path "./etc/default/tvheadend" ! -path "./etc/init.d/tvheadend" ! -regex './DEBIAN/.*' -printf '%P' | LC_ALL=C sort -z | xargs -r0 md5sum > DEBIAN/md5sums) >/dev/null chmod 644 debian/tvheadend/DEBIAN/md5sums chown 0:0 debian/tvheadend/DEBIAN/md5sums (cd debian/tvheadend-dbg >/dev/null ; find . -type f ! -regex './DEBIAN/.*' -printf '%P' | LC_ALL=C sort -z | xargs -r0 md5sum > DEBIAN/md5sums) >/dev/null chmod 644 debian/tvheadend-dbg/DEBIAN/md5sums chown 0:0 debian/tvheadend-dbg/DEBIAN/md5sums dh_builddeb dpkg-deb --build debian/tvheadend .. dpkg-deb: building package
tvheadend' in../tvheadend_3.9-1800-gddeb002_amd64.deb'. dpkg-deb --build debian/tvheadend-dbg .. dpkg-deb: building package
tvheadend-dbg' in `../tvheadend-dbg_3.9-1800-gddeb002_amd64.deb'. dpkg-genchanges >../tvheadend_3.9-1800-gddeb002_amd64.changes dpkg-genchanges: error: cannot read ../tvheadend_3.9-1800-gddeb002.dsc: No such file or directory dpkg-buildpackage: error: dpkg-genchanges gave error exit status 2 cp: omitting directory '../tvheadend'Perhaps, it's my run command that is wrong? Or simply the package isn't working anymore? I've tried googling for the error but I couldn't find much to lead me to a solution. Have you run across a similar issue?
Thanks for your help and keep up the good work! :)