Building Your Own CDVR Docker Image with Chrome (not Chromium) for YTTV TVE Support (amd64 processors only)

@chDVRuser @slampman

My apologies. I did a bit of cleanup before my last test build, including removing the / from CMD ["/run.sh"], then proceeded to build using the image name channels-dvr-local:tve (which seemed more appropriate). However, when I spun-up the container, I forgot to change the tag to tve. :frowning: -- so I was running the previous build.

I've fixed that now in post #1, along with suggesting an image name of channels-dvr-local:tve, and adjusted the env vars that go along with the Docker compose to use the tve tag.

Tested it all again moments ago, this time with no other versions lurking about. We should be good now...

2 Likes

Amazing what a missing slash can do. Working now with CMD ["/run.sh"] in the build.
Of course, I can't test it with YTTV, but at least the image builds and the container is created.

Doing an exec into the container shows run.sh in the root directory with perms 0711

root@DS1019PLUS:/# pwd
/
root@DS1019PLUS:/# ls -l
total 60
lrwxrwxrwx   1 root root     7 Jun  9 17:00 bin -> usr/bin
drwxr-xr-x   2 root root  4096 May  9 07:50 boot
drwxr-xr-x   4 1026 users 4096 Jun 21 09:28 channels-dvr
drwxr-xr-x   6 root root   360 Jun 21 09:28 dev
drwxr-xr-x  63 root root  4096 Jun 21 09:28 etc
drwxr-xr-x   2 root root  4096 May  9 07:50 home
lrwxrwxrwx   1 root root     7 Jun  9 17:00 lib -> usr/lib
lrwxrwxrwx   1 root root     9 Jun  9 17:00 lib64 -> usr/lib64
drwxr-xr-x   2 root root  4096 Jun  9 17:00 media
drwxr-xr-x   2 root root  4096 Jun  9 17:00 mnt
drwxr-xr-x   3 root root  4096 Jun 21 09:24 opt
dr-xr-xr-x 382 root root     0 Jun 21 09:28 proc
drwx------   3 root root  4096 Jun 21 09:23 root
drwxr-xr-x   9 root root  4096 Jun 21 09:24 run
-rwx--x--x   1 root root   435 Dec 31  1969 run.sh
lrwxrwxrwx   1 root root     8 Jun  9 17:00 sbin -> usr/sbin
drwxr-xr-x   2 root root  4096 Jun  9 17:00 srv
dr-xr-xr-x  12 root root     0 Mar  3 10:24 sys
drwxrwxrwt   2 root root  4096 Jun 21 09:24 tmp
drwxr-xr-x  21 root root  4096 Jun 21 09:25 usr
drwxr-xr-x  17 root root  4096 Jun 21 09:24 var
drwxr-xr-x   3 root root  4096 Jun 21 09:28 volume1
1 Like

Let me know if you see anything that's functionally different than the fancybits container. This container is based on Debian Slim rather than Alpine, for Chrome support, but otherwise the idea is to have matching structure and functionality.

I'll try adding Xfinity TVE as a source and will let you know.
Failed three times in a row.
Tries Discovery (it's not in my package) and then CSPAN (in my package) and fails.
Here's the tve_error_screenshot.png

Curious if anyone else gets it to work.

1 Like

So TVE works with the fancybits container, but not this one?

Yes, I have Xfinity TVE working with the fancybits TVE container on another DVR server running in a container (on the same Synology NAS). And the Channels DVR Troubleshooting is showing all green checkmarks for your container and showing Chrome is up to date TV Everywhere Chrome version up to date: 137.0.7151.119

The fancybits TVE container shows TV Everywhere Chrome version up to date: 132.0.6834.83

Interesting, basically the opposite results -- works with Chromium, but not with Chrome. Hopefully @slampman will post back regarding YTTV.

No go unfortunately. I cant get the container out of a restart loop

exec /run.sh: no such file or directory
exec /run.sh: no such file or directory
exec /run.sh: no such file or directory
exec /run.sh: no such file or directory
exec /run.sh: no such file or directory
exec /run.sh: no such file or directory
exec /run.sh: no such file or directory
exec /run.sh: no such file or directory

from the build log:

Processing triggers for libc-bin (2.36-9+deb12u10) ...

 ---> Removed intermediate container 043550cc98b1

 ---> 6df2f275923d

Step 5/8 : EXPOSE 8089



 ---> Running in 5b586b11c683

 ---> Removed intermediate container 5b586b11c683

 ---> a430560135a1

Step 6/8 : ADD run.sh .



 ---> d1a556b2e07a

Step 7/8 : RUN chmod +x run.sh



 ---> Running in 5131e80ff2a0

 ---> Removed intermediate container 5131e80ff2a0

 ---> 98369ebf5109

Step 8/8 : CMD ["/run.sh"]



 ---> Running in 6e873c6f25f1

 ---> Removed intermediate container 6e873c6f25f1

 ---> 4cc6ddf43ccf

Successfully built 4cc6ddf43ccf

Successfully tagged channels-dvr-local:tve

Ok so doing better... I did the run.sh script in Notepad++ but i forgot to do edit > eol conversion > unix

Update, works as is for YTTV!!!

1 Like

I went ahead and pushed the container I built to my Docker hub. Just add bnhf/ in front of the image name in the Docker Compose above, and you should be able to pull it rather than using your locally built version.

Like this:

    image: bnhf/channels-dvr-local:${TAG}

As you can tell, I'm very curious to know if this works for you too. Apparently it's a bust with Xfinity, but it worked for me with YTTV.

Glad to hear it! Weird that it failed for Xfinity -- but it's kind of a niche fix, and those that really want to use YTTV credentials in a Docker container will probably be happy to have a working option.

@eric It looks like we have a fix/workaround for using YTTV in Docker by using Chrome rather than Chromium. I'm happy to maintain this niche fix, but I'm wondering if you'd be willing to post the Dockerfile you use to build fancybits/channels-dvr:tve?

I'd like to confirm I'm including all needed components, and eliminate anything I'm adding that's not required.

1 Like

Just for grins...
I was able to add a TVE source using my free SlingTV Freestream account.
Of course it only added the 68 FAST channels 6700-6993, but it did add the source and streaming works.
It just doesn't like Xfinity for some reason.

2 Likes

I uploaded our current Dockerfiles here. You can send us pull requests.

2 Likes

@chDVRuser If you're willing, here are a couple of updates to the image building process in post #1, that will yield a result even closer to "stock" (based on the recently posted fancybits Dockerfiles). This also works with YTTV, and it'd be interesting to know if it makes a difference with Xfinity.

A second bash script is needed, in addition to run.sh listed above. As always, when creating Linux scripts be sure your editor is using Linux-style linefeed line endings:

extract-version.sh:

#!/bin/sh
dpkg -s google-chrome-stable | awk -F': ' '/^Version/ {print $2}' | cut -d- -f1 > /chrome-version

echo "Chrome version: $(cat /chrome-version)"

And here's the Dockerfile, as closely matching the fancybits version as possible, while using Debian 12 and Chrome:

FROM debian:bookworm-slim

# Install dependencies
RUN apt-get update && \
    apt-get install -y --no-install-recommends \
        curl \
        gnupg \
        ca-certificates \
        tzdata \
        xvfb \
        tini && \
    rm -rf /var/lib/apt/lists/*

# Add Google Chrome APT repo and install Chrome Stable
RUN curl -fsSL https://dl.google.com/linux/linux_signing_key.pub | gpg --dearmor -o /usr/share/keyrings/google-chrome.gpg && \
    echo "deb [arch=amd64 signed-by=/usr/share/keyrings/google-chrome.gpg] http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list && \
    apt-get update && \
    apt-get install -y --no-install-recommends google-chrome-stable && \
    rm -rf /var/lib/apt/lists/*

# Create necessary directories
RUN mkdir -p /channels-dvr/data /data

# Copy and execute version extraction script
ADD extract-version.sh /usr/local/bin
RUN chmod +x /usr/local/bin/extract-version.sh && \
    /usr/local/bin/extract-version.sh && \
    rm /usr/local/bin/extract-version.sh

# Copy run script
ADD run.sh .
RUN chmod +x run.sh

# Set volume
VOLUME ["/channels-dvr"]

# Set tini as the init system
ENTRYPOINT ["/usr/bin/tini", "--"]
CMD ["./run.sh"]

Before clicking build, be sure you attach both run.sh and extract-version.sh. Use the typical <Ctrl>-Left Click method for selecting additional files after clicking on the first. It should look like this:

Probably a bit of a longshot that it'll make a difference -- but, who knows?

1 Like

Thanks for the try, but same result. Fails.
Tries to authenticate Discovery (not in my package) then CSPAN (in my package) and fails on both.

Are you still considering supporting this image?

I've been using it (your latest post here, based on the recently posted fancybits Dockerfiles) in addition to the Channels DVR TVE image for YTTV and it's been working great so far.

I assume that to update Chrome in yours, one just needs to rebuild the image and then redeploy the CDVR TVE stack in Portainer.

Happy to do it.

Yes, to update Chrome in a way that will survive reboots, means rebuilding the image.

I may add this to Project One-Click at some point -- to automate the build, but for now I'll maintain the Dockerfile and it'll be a DIY local build.

Sound reasonable?

1 Like

Thanks, Sounds good.
I'll just build a new image if I need to update Chrome (currently v138).

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.