k3ck3c/docker_captvty

The image https://hub.docker.com/r/k3ck3c/captvty_v3_1/ doesn't work.

mrorgues opened this issue · 15 comments

Hi K3c,

First, thanks a lot for sharing your ideas and work (https://forum.ubuntu-fr.org/viewtopic.php?id=878081&p=16)! I really appreciate!

I've tried to use your docker image: https://hub.docker.com/r/k3ck3c/captvty_v3_1/ .
Unfortunately, it doesn't work.
Issue 1: The /home/gg folder belongs to root:root. Hence, you can't run Captvty as gg user.

Here are some additional issues.
Issue 2: You can't mount the download folder.
Issue 3: You can't run "apt-get update" since the package "apt-transport-https" is missing.
Issue 4: Your image is quite big. Could you please publish the source code (Dockerfile, configuration, etc) ?

I've been able to fix both issues 1 and 3.
To do so, I've created the following dockerfile:
"
FROM k3ck3c/captvty_v3_1

USER root
RUN sed -i 's,https,http,g' /etc/apt/sources.list &&
apt-get update -qq &&
apt-get install -qqy
apt-transport-https
sudo &&
echo "gg ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/gg &&
chown -R gg:gg /home/gg
USER gg
"

FYI, I also created my own dockerfile. The installation is totally automated.
Please see: https://github.com/mrorgues/dockerfiles/tree/master/captvty

Hello

You can find the Dockerfile for both Captvty (v2, classical) and v3 at

https://forum.ubuntu-fr.org/viewtopic.php?id=2022353

I will add some details, as I use some build arg in the Dockerfile and the docker build command.

I will do an automated build as soon as I find how to do it :-)

As you may guess, I am dealing today with transportation issues, so more news this evening.

Thanks for your work

About the apt package missing, it is a choice, trying to keep the image not too big

Hello

you say

Issue 1: The /home/gg folder belongs to root:root. Hence, you can't run Captvty as gg user.

This is weird, as I have used it last week, downloaded some vidéo files, and copied, using
docker cp ...

I will investigate this evening

One of the reasons the image is big is that I install xvfb, in order to be able to do

xvfb-run -a /tmp/winetricks -q --unattended dotnet45 corefonts comctl32 gdiplus vcrun2010 ie8

without an error about the display

If not, I thought I had to build with several steps, as in
https://lunixite.nappey.org/du-vin-dans-un-bac-a-sable-wine-in-a-sandbox.html

Maybe I am wrong

I noticed the image lacks the UTF 8 locale, so there is a problem for downloading the Vidéos folder.

I will fix that.

  1. For my part, I didn't use Xvfb for executing winetricks. "-q" option should do the trick.
  2. I don't think "comctl32, gdiplus, vcrun2010" are really required. They might (not sure) be required if you're using the embedded player.
  3. I've haven't been able to use the embedded player. Even when ie8 and flash are installed.
  4. Indeed, you can't use the Vidéos folder. That's why I changed the default configuration from "Vidéos" to "videos".
    "sed -i 's,Vidéos,videos,g' /opt/captvty/Captvty.exe.config"
    COPY config/Captvty.settings /opt/captvty/Captvty.settings

For my part, I didn't use Xvfb for executing winetricks. "-q" option should do the trick.

Great, this will much reduce the size of the image.
Maybe it is worlking only with wine64, as I use wine 32 bits?
I tried to build Captvty with a FROM alpine, but could not get dotnet40 installed.

I don't think "comctl32, gdiplus, vcrun2010" are really required. They might (not sure) be required if you're using the embedded player.

With wine 1.6, I remember there was a problem if lacking gdiplus or comctl32, the display was unreadable, so we could not choose to download a vidéo, as we did not know which one it was.
maybe wine 3 is different on that subject.

I've haven't been able to use the embedded player. Even when ie8 and flash are installed.

I have been able to use it with Captvty (not in a docker container).
Not sure I remember the exact procedure.
I have not done anything in the docker image (for Captvty classical or Captvty V3) in order to use the embedded player. In fact I do not think this is useful, as it is so easy to open a browser on videos.tf1.fr or francetv.fr or...

I tried your Dockerfile, docker build repeats (and never completes)

err:ntdll:RtlpWaitForCriticalSection section 0x7bd1a680 "virtual.c: csVirtual" wait timed out in thread 02e8, blocked by 02ea, retrying (60 sec)
err:ntdll:RtlpWaitForCriticalSection section 0x7bd1a680 "virtual.c: csVirtual" wait timed out in thread 0246, blocked by 0248, retrying (60 sec)
err:ntdll:RtlpWaitForCriticalSection section 0x7bd1a680 "virtual.c: csVirtual" wait timed out in thread 02e8, blocked by 02ea, retrying (60 sec)
err:ntdll:RtlpWaitForCriticalSection section 0x7bd1a680 "virtual.c: csVirtual" wait timed out in thread 0246, blocked by 0248, retrying (60 sec)
err:ntdll:RtlpWaitForCriticalSection section 0x7bd1a680 "virtual.c: csVirtual" wait timed out in thread 02e8, blocked by 02ea, retrying (60 sec)
err:ntdll:RtlpWaitForCriticalSection section 0x7bd1a680 "virtual.c: csVirtual" wait timed out in thread 0246, blocked by 0248, retrying (60 sec)
err:ntdll:RtlpWaitForCriticalSection section 0x7bd1a680 "virtual.c: csVirtual" wait timed out in thread 02e8, blocked by 02ea, retrying (60 sec)
err:ntdll:RtlpWaitForCriticalSection section 0x7bd1a680 "virtual.c: csVirtual" wait timed out in thread 0246, blocked by 0248, retrying (60 sec)
err:ntdll:RtlpWaitForCriticalSection section 0x7bd1a680 "virtual.c: csVirtual" wait timed out in thread 02e8, blocked by 02ea, retrying (60 sec)
err:ntdll:RtlpWaitForCriticalSection section 0x7bd1a680 "virtual.c: csVirtual" wait timed out in thread 0246, blocked by 0248, retrying (60 sec)
err:ntdll:RtlpWaitForCriticalSection section 0x7bd1a680 "virtual.c: csVirtual" wait timed out in thread 02e8, blocked by 02ea, retrying (60 sec)
err:ntdll:RtlpWaitForCriticalSection section 0x7bd1a680 "virtual.c: csVirtual" wait timed out in thread 0246, blocked by 0248, retrying (60 sec)
err:ntdll:RtlpWaitForCriticalSection section 0x7bd1a680 "virtual.c: csVirtual" wait timed out in thread 02e8, blocked by 02ea, retrying (60 sec)
err:ntdll:RtlpWaitForCriticalSection section 0x7bd1a680 "virtual.c: csVirtual" wait timed out in thread 0246, blocked by 0248, retrying (60 sec)
err:ntdll:RtlpWaitForCriticalSection section 0x7bd1a680 "virtual.c: csVirtual" wait timed out in thread 02e8, blocked by 02ea, retrying (60 sec)
err:ntdll:RtlpWaitForCriticalSection section 0x7bd1a680 "virtual.c: csVirtual" wait timed out in thread 0246, blocked by 0248, retrying (60 sec)
err:ntdll:RtlpWaitForCriticalSection section 0x7bd1a680 "virtual.c: csVirtual" wait timed out in thread 02e8, blocked by 02ea, retrying (60 sec)
err:ntdll:RtlpWaitForCriticalSection section 0x7bd1a680 "virtual.c: csVirtual" wait timed out in thread 0246, blocked by 0248, retrying (60 sec)
err:ntdll:RtlpWaitForCriticalSection section 0x7bd1a680 "virtual.c: csVirtual" wait timed out in thread 02e8, blocked by 02ea, retrying (60 sec)
err:ntdll:RtlpWaitForCriticalSection section 0x7bd1a680 "virtual.c: csVirtual" wait timed out in thread 0246, blocked by 0248, retrying (60 sec)
err:ntdll:RtlpWaitForCriticalSection section 0x7bd1a680 "virtual.c: csVirtual" wait timed out in thread 02e8, blocked by 02ea, retrying (60 sec)
err:ntdll:RtlpWaitForCriticalSection section 0x7bd1a680 "virtual.c: csVirtual" wait timed out in thread 0246, blocked by 0248, retrying (60 sec)
err:ntdll:RtlpWaitForCriticalSection section 0x7bd1a680 "virtual.c: csVirtual" wait timed out in thread 02e8, blocked by 02ea, retrying (60 sec)
err:ntdll:RtlpWaitForCriticalSection section 0x7bd1a680 "virtual.c: csVirtual" wait timed out in thread 0246, blocked by 0248, retrying (60 sec)
err:ntdll:RtlpWaitForCriticalSection section 0x7bd1a680 "virtual.c: csVirtual" wait timed out in thread 02e8, blocked by 02ea, retrying (60 sec)
err:ntdll:RtlpWaitForCriticalSection section 0x7bd1a680 "virtual.c: csVirtual" wait timed out in thread 0246, blocked by 0248, retrying (60 sec)
err:ntdll:RtlpWaitForCriticalSection section 0x7bd1a680 "virtual.c: csVirtual" wait timed out in thread 02e8, blocked by 02ea, retrying (60 sec)
err:ntdll:RtlpWaitForCriticalSection section 0x7bd1a680 "virtual.c: csVirtual" wait timed out in thread 0246, blocked by 0248, retrying (60 sec)
err:ntdll:RtlpWaitForCriticalSection section 0x7bd1a680 "virtual.c: csVirtual" wait timed out in thread 02e8, blocked by 02ea, retrying (60 sec)
err:ntdll:RtlpWaitForCriticalSection section 0x7bd1a680 "virtual.c: csVirtual" wait timed out in thread 0246, blocked by 0248, retrying (60 sec)
err:ntdll:RtlpWaitForCriticalSection section 0x7bd1a680 "virtual.c: csVirtual" wait timed out in thread 02e8, blocked by 02ea, retrying (60 sec)
err:ntdll:RtlpWaitForCriticalSection section 0x7bd1a680 "virtual.c: csVirtual" wait timed out in thread 0246, blocked by 0248, retrying (60 sec)
err:ntdll:RtlpWaitForCriticalSection section 0x7bd1a680 "virtual.c: csVirtual" wait timed out in thread 02e8, blocked by 02ea, retrying (60 sec)
err:ntdll:RtlpWaitForCriticalSection section 0x7bd1a680 "virtual.c: csVirtual" wait timed out in thread 0246, blocked by 0248, retrying (60 sec)
err:ntdll:RtlpWaitForCriticalSection section 0x7bd1a680 "virtual.c: csVirtual" wait timed out in thread 02e8, blocked by 02ea, retrying (60 sec)
err:ntdll:RtlpWaitForCriticalSection section 0x7bd1a680 "virtual.c: csVirtual" wait timed out in thread 0246, blocked by 0248, retrying (60 sec)
err:ntdll:RtlpWaitForCriticalSection section 0x7bd1a680 "virtual.c: csVirtual" wait timed out in thread 02e8, blocked by 02ea, retrying (60 sec)
err:ntdll:RtlpWaitForCriticalSection section 0x7bd1a680 "virtual.c: csVirtual" wait timed out in thread 0246, blocked by 0248, retrying (60 sec)
err:ntdll:RtlpWaitForCriticalSection section 0x7bd1a680 "virtual.c: csVirtual" wait timed out in thread 02e8, blocked by 02ea, retrying (60 sec)
err:ntdll:RtlpWaitForCriticalSection section 0x7bd1a680 "virtual.c: csVirtual" wait timed out in thread 0246, blocked by 0248, retrying (60 sec)
err:ntdll:RtlpWaitForCriticalSection section 0x7bd1a680 "virtual.c: csVirtual" wait timed out in thread 02e8, blocked by 02ea, retrying (60 sec)
err:ntdll:RtlpWaitForCriticalSection section 0x7bd1a680 "virtual.c: csVirtual" wait timed out in thread 0246, blocked by 0248, retrying (60 sec)

Have you modified my Dockerfile?
I used to have this issue.
I solved it by installing "libp11-kit-gnome-keyring:i386" and "p11-kit:i386" and updating winetricks.

The current Dockerfile should work. Actually, last images have been built successfully:
https://hub.docker.com/r/mrorgues/captvty/builds/
https://hub.docker.com/r/mrorgues/captvty/~/dockerfile/

FYI, I use Docker Hub for building my images: https://docs.docker.com/docker-hub/builds/

I get an error 404 on

https://hub.docker.com/r/mrorgues/captvty/~/dockerfile/

I tried various things in my Dockerfile, but when removing xvfb, I always fail to get a

docker build ...
that completes

Latest Docker build attempt when modifying my Dockerfile

...
Executing load_comctl32
Executing mkdir -p /home/gg/.cache/winetricks/comctl32
Executing cd /home/gg/.cache/winetricks/comctl32
Downloading https://downloads.sourceforge.net/project/pocmin/Win%2095_98%20Controls/Win%2095_98%20Controls/CC32inst.exe to /home/gg/.cache/winetricks/comctl32
--2018-04-07 05:11:25-- https://downloads.sourceforge.net/project/pocmin/Win%2095_98%20Controls/Win%2095_98%20Controls/CC32inst.exe
Resolving downloads.sourceforge.net (downloads.sourceforge.net)... 216.105.38.13
Connecting to downloads.sourceforge.net (downloads.sourceforge.net)|216.105.38.13|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://freefr.dl.sourceforge.net/project/pocmin/Win%2095_98%20Controls/Win%2095_98%20Controls/CC32inst.exe [following]
--2018-04-07 05:11:26-- https://freefr.dl.sourceforge.net/project/pocmin/Win%2095_98%20Controls/Win%2095_98%20Controls/CC32inst.exe
Resolving freefr.dl.sourceforge.net (freefr.dl.sourceforge.net)... 88.191.250.136, 2a01:e0d:1:8:58bf:fa88:0:1
Connecting to freefr.dl.sourceforge.net (freefr.dl.sourceforge.net)|88.191.250.136|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 587496 (574K) [application/octet-stream]
Saving to: ‘CC32inst.exe’

 0K .......... .......... .......... .......... ..........  8% 11,6M 0s
50K .......... .......... .......... .......... .......... 17% 12,2M 0s

100K .......... .......... .......... .......... .......... 26% 2,30M 0s
150K .......... .......... .......... .......... .......... 34% 11,8M 0s
200K .......... .......... .......... .......... .......... 43% 12,3M 0s
250K .......... .......... .......... .......... .......... 52% 6,39M 0s
300K .......... .......... .......... .......... .......... 61% 38,1M 0s
350K .......... .......... .......... .......... .......... 69% 10,3M 0s
400K .......... .......... .......... .......... .......... 78% 12,0M 0s
450K .......... .......... .......... .......... .......... 87% 11,7M 0s
500K .......... .......... .......... .......... .......... 95% 10,3M 0s
550K .......... .......... ... 100% 14,4M=0,07s

2018-04-07 05:11:26 (8,51 MB/s) - ‘CC32inst.exe’ saved [587496/587496]

Executing cd /
Executing wine /home/gg/.cache/winetricks/comctl32/cc32inst.exe /T:C:\windows\Temp_comctl32 /c /q

Note: command wine /home/gg/.cache/winetricks/comctl32/cc32inst.exe /T:C:\windows\Temp_comctl32 /c /q returned status 43. Aborting.

The command '/bin/sh -c winecfg && /tmp/winetricks -q --unattended dotnet45 corefonts comctl32 gdiplus vcrun2010 ie8' returned a non-zero code: 1
$

The Dockerfile used

FROM ubuntu:16.04

inspired by webanck/docker-wine-steam

preparations

ENV DEBIAN_FRONTEND noninteractive
ENV LANG fr_FR.UTF-8
ENV LANGUAGE fr_FR:en
ENV LC_ALL fr_FR.UTF-8

activate i386 arch for Wine and install stuff we need

RUN locale-gen fr_FR.UTF-8 &&
dpkg --add-architecture i386 &&
apt-get update &&
BUILD_PACKAGES='wget software-properties-common unzip apt-transport-https cabextract winbind squashfs-tools pulseaudio' &&
apt-get -qy upgrade && apt-get -qy install $BUILD_PACKAGES &&
AUTO_ADDED_PACKAGES=apt-mark showauto && \
# install latest Wine
wget -qO- https://dl.winehq.org/wine-builds/Release.key | apt-key add - &&
apt-add-repository https://dl.winehq.org/wine-builds/ubuntu/ &&
apt-get update && apt-get -qy install --no-install-recommends winehq-devel && \

# make sshd work and enable X11 forwarding
# create our user for Wine

useradd -d /home/gg -m -s /bin/bash gg &&
echo gg:gg | chpasswd && \
# winetricks
wget https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks -O /tmp/winetricks &&
chmod +x /tmp/winetricks &&
echo $AUTO_ADDED_PACKAGES &&
sleep 11
USER gg
ENV WINEDEBUG=-all WINEPREFIX=/home/gg/.wine WINEARCH=win32
RUN winecfg &&
/tmp/winetricks -q --unattended dotnet45 corefonts comctl32 gdiplus vcrun2010 ie8
USER root
# cleaning up
RUN apt-get autoremove -y --purge software-properties-common &&
apt-get autoremove -y --purge &&
apt-get remove --purge -y software-properties-common apt-transport-https openssh-server xauth cabextract winbind squashfs-tools pulseaudio x11-apps xfce4 cups joe xfce4-terminal xvfb socat x11vnc &&
apt-get clean -y &&
rm -rf /home/wine/.cache &&
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /tmp/inetricks
USER gg
RUN wget -q -O- http://v3.captvty.fr/ | egrep -o '//.+?.zip' | sed 's////http:///' | xargs wget -O /tmp/v3Captvty.zip &&
ls -alrt /tmp/v3Capzip && unzip -d ~/Captvtyv3 /tmp/v3Captvty.zip && rm /tmp/v3Captvty.zip
USER root
RUN apt-get remove --purge -y wget &&
apt-get clean -y &&
apt-get autoremove -y &&
rm -rf /home/wine/.cache &&
rm -rf /var/lib/apt/lists/
/tmp/* /var/tmp/*
USER gg
CMD wine /home/gg/Captvtyv3/Captvty.exe

The latest k3ck3c/captvty_v3_1 is smaller, deals correctly with accents.

I will post the Dockerfile later