tomplex / lazyman-docker

Dockerized implementation of LazyMan (https://github.com/StevensNJD4/LazyMan)
2 stars 0 forks source link

Working version #1

Open dimitry-ishenko opened 6 years ago

dimitry-ishenko commented 6 years ago

You have to download and extract LazyMan ahead of time.

Dockerfile:

FROM ubuntu

RUN apt-get update && apt-get upgrade -y                \
 && apt-get install -y software-properties-common       \
 && add-apt-repository ppa:nilarimogard/webupd8         \
 && apt-get auto-remove -y software-properties-common   \
 && apt-get update                                      \
 && apt-get install -y sudo streamlink default-jdk mpv  \
 && apt-get clean && rm -vrf /var/lib/apt/lists/*       \
 && mkdir /root/download && echo root:root | chpasswd

COPY LazyMan.jar config.properties /root/

CMD [ "java", "-jar", "/root/LazyMan.jar" ]

Build: docker build -t lazyman .

Run: xhost +local:root ; docker run -it -v /tmp/.X11-unix/:/tmp/.X11-unix/ -v ~/download/nhl/:/root/download/ -e DISPLAY --rm lazyman ; xhost -local:root

dimitry-ishenko commented 6 years ago

The only downside is that the files are owned by root. That's easy to fix. Simply add user with useradd that has the same UID as you and use the USER command to switch to it. Make sure you add a record to /etc/sudoers.d.

dimitry-ishenko commented 6 years ago

Hope you are running Linux on your host, cuz this won't work on Weendoze :stuck_out_tongue_closed_eyes:

tomplex commented 6 years ago

No windows for me here. Do you mind forking & submitting a PR?

tomplex commented 6 years ago

By the way, thanks for the issue - I sort of dropped this project but this is a good time to revive it with the season starting again!

dimitry-ishenko commented 6 years ago

I don't like the xhost +local:root part either. If I ever get around to it, I will figure out something better and will send a PR.