Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add docker support (example included) #285

Open
grrvs opened this issue Feb 1, 2022 · 3 comments
Open

add docker support (example included) #285

grrvs opened this issue Feb 1, 2022 · 3 comments

Comments

@grrvs
Copy link

grrvs commented Feb 1, 2022

Hi there, I just tried to run chansort in docker.

This is the Dockerfile:

FROM scottyhardy/docker-wine:latest
ARG CHANSORT_RELEASE="2021-10-24"
RUN xvfb-run winetricks -q dotnet48
RUN mkdir /app
RUN wget https://github.com/PredatH0r/ChanSort/releases/download/v${CHANSORT_RELEASE}/ChanSort_${CHANSORT_RELEASE}.zip -O /tmp/ChanSort_${CHANSORT_RELEASE}.zip
RUN unzip /tmp/ChanSort_${CHANSORT_RELEASE}.zip -d /app/
RUN rm -rf /tmp/ChanSort_*
ENV RUN_AS_ROOT=yes
WORKDIR /app/ChanSort_${CHANSORT_RELEASE}/
ENTRYPOINT ["/usr/bin/entrypoint", "wine", "ChanSort.exe"] 

And this is how I build and run (on ubuntu focal):

# build the image
docker build . -t chansort:latest

# run the container - please don't forget to update /path/to/channel_list wherever
docker run -it \
  --rm \
  --hostname="$(hostname)" \
  --env="DISPLAY" \
  --volume="${XAUTHORITY:-${HOME}/.Xauthority}:/root/.Xauthority:ro" \
  --volume="/tmp/.X11-unix:/tmp/.X11-unix:ro" \
  --volume="/path/to/channel_list:/data" \
  chansort:latest

Instructions were taken straight from scottyhardy/docker-wine.

Chansort is starting and I am able to edit and save a channel list but I did not test that list on a TV (yet).

@baztian
Copy link

baztian commented Jul 25, 2023

Thanks for the instructions. For me it failed installing dotnet

76.74 warning: dotnet40 install completed, but installed file /root/.wine/dosdevices/c:/windows/Microsoft.NET/Framework/v4.0.30319/ngen.exe not found
76.74 ------------------------------------------------------
------
Dockerfile:3
--------------------
   1 |     FROM scottyhardy/docker-wine:latest
   2 |     ARG CHANSORT_RELEASE="2023-06-01"
   3 | >>> RUN xvfb-run winetricks -q dotnet48
   4 |     RUN mkdir /app
   5 |     RUN wget https://github.com/PredatH0r/ChanSort/releases/download/v${CHANSORT_RELEASE}/ChanSort_${CHANSORT_RELEASE}.zip -O /tmp/ChanSort_${CHANSORT_RELEASE}.zip
--------------------
ERROR: failed to solve: process "/bin/sh -c xvfb-run winetricks -q dotnet48" did not complete successfully: exit code: 1

@baztian
Copy link

baztian commented Jul 25, 2023

I was able to resolve the issue by going back to an older wine release

FROM scottyhardy/docker-wine:stable-7.0
ARG CHANSORT_RELEASE="2023-06-01"
RUN xvfb-run winetricks -q dotnet48
RUN mkdir /app
RUN wget https://github.com/PredatH0r/ChanSort/releases/download/v${CHANSORT_RELEASE}/ChanSort_${CHANSORT_RELEASE}.zip -O /tmp/ChanSort_${CHANSORT_RELEASE}.zip
RUN unzip /tmp/ChanSort_${CHANSORT_RELEASE}.zip -d /app/
RUN rm -rf /tmp/ChanSort_*
ENV RUN_AS_ROOT=yes
WORKDIR /app/ChanSort_${CHANSORT_RELEASE}/
ENTRYPOINT ["/usr/bin/entrypoint", "wine", "ChanSort.exe"]

@baztian
Copy link

baztian commented Jul 25, 2023

also I needed to add --ipc host command line flag to docker run command

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants