-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.mythweb
86 lines (76 loc) · 2.82 KB
/
Dockerfile.mythweb
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
FROM debian:buster
# Build arguments
# ARG MYTH_PKG_VERSION=2:31.0+fixes.202108081239.5da2523154~ubuntu20.04.1
# Set correct environment variables
ENV DEBIAN_FRONTEND=noninteractive
# ENV LANG=en_AU.UTF-8
# ENV LANGUAGE=en_AU:en
# ENV LC_ALL=en_AU.UTF-8
ENV TZ="UTC"
# These can be overriden at runtime.
# ENV USER_ID=99
# ENV GROUP_ID=100
ENV DATABASE_HOST=mysql
ENV DATABASE_PORT=3306
# ENV DATABASE_ROOT_FILE=
ENV DATABASE_NAME=mythconverg
ENV DATABASE_USER=mythtv
ENV DATABASE_PWD=mythtv
# ENV DATABASE_BACKUP=
ENV MYTHWEB_PORT=80
# Expose ports (SSH, mythweb, UPNP, mythtvx2)
EXPOSE $MYTHWEB_PORT
# add repositories
RUN apt-get update -qq && \
# locales tzdata
apt-get install -y --no-install-recommends curl gnupg lsb-release && \
echo deb http://www.borgs.net/debian/mythtv/30 buster main > /etc/apt/sources.list.d/mythtv30.list && \
curl http://www.borgs.net/debian/signing.gpg | apt-key add - && \
apt-get update -qq && \
# chfn workaround - Known issue within Dockers
ln -s -f /bin/true /usr/bin/chfn && \
# set the locale
# locale-gen ${LANG} && \
# prepare apt
apt-get install -y tzdata && \
# apt-get install -y lsb-release && \
# apt-get install -y software-properties-common --no-install-recommends && \
# apt-add-repository ppa:mythbuntu/$MYTH_VERSION -y && \
# apt-get update -qq && \
# packages to install
apt-get install -y --no-install-recommends \
# mythtv backend and utilities (mythweb=${MYTH_PKG_VERSION}) mythtv-common=${MYTH_PKG_VERSION} libmyth-python
# mythtv-backend xmltv mariadb-client \
mythweb \
# required to get download modules to work
libcgi-pm-perl libdbi-perl libdbd-mysql-perl \
&& \
# ssh and x11 to enable setup
# openssh-server x11-utils xauth xterm sudo && \
# clean up
apt-get clean && \
rm -rf /tmp/* /var/tmp/* \
/usr/share/man /usr/share/groff /usr/share/info \
/usr/share/lintian /usr/share/linda /var/cache/man && \
(( find /usr/share/doc -depth -type f ! -name copyright|xargs rm || true )) && \
(( find /usr/share/doc -empty|xargs rmdir || true ))
# Add files
COPY files /root/
# create/place required files/folders
RUN \
# mkdir -p /home/mythtv/.mythtv /var/lib/mythtv /var/log/mythtv && \
# configure user mythtv (set password, login shell, home dir add to required groups)
# echo "mythtv:mythtv" | chpasswd && \
# usermod -s /bin/bash -d /home/mythtv -a -G users,mythtv mythtv && \
# setup epg file download script
# mv /root/tv_grab_au_file /usr/bin/ && \
# chmod a+rx /usr/bin/tv_grab_au_file &&\
# enable apache modules
a2enmod headers && \
a2enmod auth_digest && \
# hack to stop systemd error msgs from popping up when running mythtv-setup
# mv -f /root/mythtv-setup.sh /usr/share/mythtv/ && \
# chmod a+rx /usr/share/mythtv/mythtv-setup.sh &&\
# set dockerentry script to executable
chmod +rx /root/mythwebentry.sh
CMD ["/root/mythwebentry.sh"]