jellyfin / jellyfin-webos

WebOS Client for Jellyfin
https://jellyfin.org
Mozilla Public License 2.0
638 stars 66 forks source link

Added docker build #32

Closed dejanzelic closed 3 years ago

dejanzelic commented 3 years ago

Added the ability and documentation to build using a docker image. This means that users won't have to install the webOS SDK to install and test the pacakge.

EraYaN commented 3 years ago

The specified docker image is very old (3 years), is there a newer one you can use? This looks much more recent (and has Tizen) https://hub.docker.com/r/vitalets/tizen-webos-sdk https://github.com/vitalets/docker-tizen-webos-sdk although that one is also a bit of a mess. We might just need to create our own if we really want it.

dejanzelic commented 3 years ago

Yeah I noticed that too. It worked for me so I figured it was ok. I initially tried to create my own but the SDK was behind a "Terms and Conditions" wall and required a GUI to install which made an automated install very difficult. If there is interest in this, I can poke around more. But this was the quick solution I came up with.

Brice187 commented 3 years ago

Works fine :)

idea: set pin and ip via env to fully automate the deployment of the ipk to your tv

oddstr13 commented 3 years ago

Looks like we decided to tackle this problem at the same time, and I didn't see this PR before now :laughing: I've been working on a python tool to package ipk files the past few days, as I figured the "oracle-java-licensing" model was too much of a hassle, combined with no good setup tool and redistribution restrictions for the LG provided tools. I didn't see this particular image when researching tho, so good find!

I got my packaging tool working today, but it needs some more polish before prime time. I also haven't started looking into what I'd need to do to install the app files yet, never mind the initial setup, so I'm currently using the ares utilities for that.

dejanzelic commented 3 years ago

Nice! Does your packaging tool still rely on the WebOS SDK installer? I really wanted to try to avoid having to download that through LG's site. Worst case scenario, I can use selenium in a builder to download the latest package.

oddstr13 commented 3 years ago

Only generates the IPK file, still need ares-install and such to upload to the TV. My main focus is making a CI tool that can help automate the building of releases, so it might never do much more either. I haven't licensed it yet, or made any documentation or setup infrastructure, but the code is on git if you want to take a look. https://github.com/oddstr13/webos-ipk

The .ipk files are just renamed .deb 2.0, which are .tar.gz files inside of a .ar, so I was fortunate that the libraries needed to interact with those where available in the stdlib or on pypi.

dejanzelic commented 3 years ago

Wow nice! I had no idea it was that simple. This can easily be placed in a docker container if needed then.

EraYaN commented 3 years ago

I guess we might want to base this PR on that tool then?

oddstr13 commented 3 years ago

My tool may need some more work, I don't think it currently handles the service part of the app correctly.

anthonylavado commented 3 years ago

An excellent idea, but closing for inactivity at the moment. When there is more dev work on the webOS package, we can revisit this.

anthonylavado commented 3 years ago

Oops - oddstr13 was going to look at this. Opening.

oddstr13 commented 3 years ago

Thank you very much for your contribution, @dejanzelic, without this I would not have been aware of the docker images!

I did however end up going with the newer tooling available in the other docker image, and implement it in a slightly different way (there's no need to create a new, mostly transparent docker image in this repo, we can just pull and use the existing image directly).

I'll leave this PR open for now, awaiting reviews on my own (I really don't enjoy deprecating other people's work like this, before it's even merged, sorry).

dejanzelic commented 3 years ago

I'm glad this helped spark something @oddstr13! I knew from the beginning that there was a better way to do this too. It was my first time dabbling with webos apps.

Let me know if I can help in anyway!

oddstr13 commented 3 years ago

Closing this as I've merged the other one. Thanks again for your work!

Tokariew commented 3 years ago

tried to run docker builder, but it fail with following error:

docker: Error response from daemon: failed to create shim: OCI runtime create failed: container_linux.go:380: starting container process caused: exec: "ares-build": executable file not found in $PATH: unknown.

after checking location of ares cli location, there is no ares-build executable

but it work fine with ares-package, so should it be used instead of ares-build?

running dev.sh without any argument to list commands fail with error on system with selinux, it will prevent building after switching to ares-package. To fix it z/Z switch for docker volume mount should be used

  docker container run -it --rm --user=$UID --network=host -v "${MY}":/home/developer:Z $CONTAINER_IMAGE "$@"