LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Containers
User Name
Password
Linux - Containers This forum is for the discussion of all topics relating to Linux containers. Docker, LXC, LXD, runC, containerd, CoreOS, Kubernetes, Mesos, rkt, and all other Linux container platforms are welcome.

Notices


Reply
  Search this Thread
Old 11-12-2020, 01:05 PM   #1
jmgibson1981
Senior Member
 
Registered: Jun 2015
Location: Tucson, AZ USA
Distribution: Debian
Posts: 1,141

Rep: Reputation: 392Reputation: 392Reputation: 392Reputation: 392
Mythtv in Docker. Missing files?


My problem is moving my mythtv-backend into Docker. The location of the maintenance scripts is empty, namely
Code:
/usr/share/doc/mythtv-backend/contrib/maintenance/optimize_mythdb.pl
does not exist. When installed bare metal it shows up just fine?

Code:
# no frills repository mythtv backend #
FROM ubuntu:focal


# needed for tzdata
# https://stackoverflow.com/questions/44331836/apt-get-install-tzdata-noninteractive

ENV DEBIAN_FRONTEND=noninteractive
RUN apt update && \
	apt full-upgrade -y && \
	apt install -y curl && \
	ln -s /usr/share/zoneinfo/$(curl https://ipapi.co/timezone) /etc/localtime

RUN apt install -y --no-install-recommends \
	ssh \
	man \
	x11-apps \
	sudo \
	xauth \
	xvfb \
	xmltv-util \
	mythtv-backend && \
	apt clean && \
	rm -r /var/lib/apt/lists/* && \
	echo "mythtv ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/mythtv

COPY config.xml /etc/mythtv/config.xml
COPY sshd_config /etc/ssh/sshd_config
RUN chown mythtv:mythtv /etc/mythtv/config.xml && \
	echo "mythtv:mythtv" | chpasswd
Not sure how important it is. I typically had this script run once a week. More interested in why it's missing really.

Last edited by jmgibson1981; 11-12-2020 at 02:40 PM.
 
Old 11-13-2020, 10:17 AM   #2
ember1205
Member
 
Registered: Oct 2014
Posts: 176

Rep: Reputation: 16
It appears that the script may be tied to the explicit Ubuntu operating system as opposed to being for a container. Have you asked on the MythTV forums for a similar maintenance script that would be useful in a container?
 
Old 11-13-2020, 07:16 PM   #3
jmgibson1981
Senior Member
 
Registered: Jun 2015
Location: Tucson, AZ USA
Distribution: Debian
Posts: 1,141

Original Poster
Rep: Reputation: 392Reputation: 392Reputation: 392Reputation: 392
Never considered that. I assumed it knew it was an Ubuntu container and that was that. I just did a post on Mythtv forums. Will report back.
 
Old 11-14-2020, 09:45 AM   #4
ember1205
Member
 
Registered: Oct 2014
Posts: 176

Rep: Reputation: 16
Quote:
Originally Posted by jmgibson1981 View Post
Never considered that. I assumed it knew it was an Ubuntu container and that was that. I just did a post on Mythtv forums. Will report back.
I would check the /etc/os-release file on both systems (full install and container) and compare. Also, compare the output of "uname -a" on both. You will likely see differences that may be behind why the script gets installed on the full install but not the container.

The only thing that made me think along these lines is because it appears that the script is doing myth updates as well as possibly OS updates, and knowing the distro is key to ensuring that the updates are scripted correctly.
 
Old 11-14-2020, 03:39 PM   #5
jmgibson1981
Senior Member
 
Registered: Jun 2015
Location: Tucson, AZ USA
Distribution: Debian
Posts: 1,141

Original Poster
Rep: Reputation: 392Reputation: 392Reputation: 392Reputation: 392
Both os-release & uname -a are the same output. I checked lsb-release (installed in container after your initial response) and it is identical to the host. Even rebuilt the container intalling it first, then the second install command did the mythtv-backend.

Quote:
It appears that the script may be tied to the explicit Ubuntu operating system as opposed to being for a container.
The script I'm mainly looking for is supposedly just for cleaning up the database. It's a perl script.

https://github.com/MythTV/mythtv/blo...mize_mythdb.pl

Suppose I could manually track it's paths and manually stick it in there. Didn't think of that.

Last edited by jmgibson1981; 11-14-2020 at 03:47 PM.
 
Old 11-14-2020, 04:56 PM   #6
jmgibson1981
Senior Member
 
Registered: Jun 2015
Location: Tucson, AZ USA
Distribution: Debian
Posts: 1,141

Original Poster
Rep: Reputation: 392Reputation: 392Reputation: 392Reputation: 392
Marking solved. Why the libdbi-perl and libmythtv-perl packages weren't pulled automatically I cannot say. I had to manually get the script from their git. I hope it's not against any rules to say I won't bother going there again. I can't even post their own file names to my thread. As such I couldn't show them my dockerfile or anything. Waste of time

This is a working Dockerfile for a basic mythtv-backend. Including link to my git for the other files as needed.

https://github.com/jmgibson1981/scri.../docker/mythtv

Code:
# no frills repository mythtv backend #
FROM ubuntu:focal

# needed for tzdata
# https://stackoverflow.com/questions/44331836/apt-get-install-tzdata-noninteractive

ENV DEBIAN_FRONTEND=noninteractive
RUN apt update && apt install -y \
        curl && \
        ln -s /usr/share/zoneinfo/$(curl https://ipapi.co/timezone) /etc/localtime

RUN apt install -y --no-install-recommends \
        ssh \
        x11-apps \
        sudo \
        xauth \
        xvfb \
        mythtv-backend \
        libdbi-perl \
        libmythtv-perl && \
        apt clean && \
        rm -r /var/lib/apt/lists/* && \
        echo "mythtv ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/mythtv && \
        apt -y --purge autoremove curl

COPY config.xml /etc/mythtv/config.xml
COPY sshd_config /etc/ssh/sshd_config
# https://github.com/MythTV/mythtv/blob/master/mythtv/contrib/maintenance/optimize_mythdb.pl
# need to download this manually to your docker build folder. probably can be gotten with wget during
# build process. still tinkering.
COPY optimize_mythdb.pl /usr/share/doc/mythtv-backend/contrib/maintenance/optimize_mythdb.pl
RUN chown mythtv:mythtv /etc/mythtv/config.xml && echo "mythtv:mythtv" | chpasswd && \
       chmod 755 /usr/share/doc/mythtv-backend/contrib/maintenance/optimize_mythdb.pl
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Red Hat partners with Docker to create Linux/Docker software stack LXer Syndicated Linux News 0 03-12-2015 05:54 PM
LXer: Ubuntu LXD: Not a Docker replacement, a Docker enhancement LXer Syndicated Linux News 0 11-05-2014 08:40 PM
LXer: Docker Founder Explains What Docker is all About LXer Syndicated Linux News 0 08-21-2014 09:20 PM
Migrating from Mythbuntu 11.04 mythtv 0.25 to LinHES 7.4 mythtv 0.25 michaelross372 Arch 0 01-17-2013 08:44 PM
yum install mythtv-suite, Mythtv, nothing found, atrpms THOR_Fedora Linux - Software 5 11-29-2006 03:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Containers

All times are GMT -5. The time now is 01:26 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration