diff --git a/.github/workflows/auto-build.yml b/.github/workflows/auto-build.yml index 07882d7b..388c83b3 100644 --- a/.github/workflows/auto-build.yml +++ b/.github/workflows/auto-build.yml @@ -78,6 +78,9 @@ jobs: - { name: prismlauncher, docker_path: apps, platforms: "linux/amd64" } - { name: kodi, docker_path: apps, platforms: "linux/amd64" } - { name: xfce, docker_path: apps, platforms: "linux/amd64" } + - { name: plex, docker_path: apps, platforms: "linux/amd64" } + - { name: emby, docker_path: apps, platforms: "linux/amd64" } + - { name: youtube, docker_path: apps, platforms: "linux/amd64" } fail-fast: false uses: ./.github/workflows/docker-build-and-publish.yml with: @@ -153,6 +156,9 @@ jobs: - { name: prismlauncher, docker_path: apps, platforms: "linux/amd64" } - { name: kodi, docker_path: apps, platforms: "linux/amd64" } - { name: xfce, docker_path: apps, platforms: "linux/amd64" } + - { name: plex, docker_path: apps, platforms: "linux/amd64" } + - { name: emby, docker_path: apps, platforms: "linux/amd64" } + - { name: youtube, docker_path: apps, platforms: "linux/amd64" } fail-fast: false uses: ./.github/workflows/docker-build-and-publish.yml with: diff --git a/apps/emby/_index.md b/apps/emby/_index.md new file mode 100644 index 00000000..4e757e70 --- /dev/null +++ b/apps/emby/_index.md @@ -0,0 +1,7 @@ +# Emby + +Emby Theater — the official living-room client for Emby Server. Streams your +personal media library with a gamepad-friendly 10-foot UI. + +This image installs the upstream Emby Theater Electron build from its GitHub +releases and launches it full-screen on top of Sway. diff --git a/apps/emby/assets/wolf.config.toml b/apps/emby/assets/wolf.config.toml new file mode 100644 index 00000000..a1e46fdb --- /dev/null +++ b/apps/emby/assets/wolf.config.toml @@ -0,0 +1,23 @@ +[[apps]] +title = "Emby" +icon_png_path = "https://games-on-whales.github.io/wildlife/apps/emby/assets/icon.png" + +[apps.runner] +type = "docker" +name = "WolfEmby" +image = "ghcr.io/games-on-whales/emby:edge" +mounts = [] +env = ["RUN_SWAY=1", "GOW_REQUIRED_DEVICES=/dev/input/* /dev/dri/* /dev/nvidia*"] +devices = [] +ports = [] +base_create_json = """ +{ + "HostConfig": { + "IpcMode": "host", + "Privileged": false, + "CapAdd": ["NET_RAW", "MKNOD", "NET_ADMIN"], + "DeviceCgroupRules": ["c 13:* rmw", "c 244:* rmw"] + } +} +\ +""" diff --git a/apps/emby/build-fedora/Dockerfile b/apps/emby/build-fedora/Dockerfile new file mode 100644 index 00000000..b6b8aa90 --- /dev/null +++ b/apps/emby/build-fedora/Dockerfile @@ -0,0 +1,51 @@ +# syntax=docker/dockerfile:1.4 +ARG BASE_APP_IMAGE=ghcr.io/games-on-whales/base-app:fedora + +# hadolint ignore=DL3006 +FROM ${BASE_APP_IMAGE} + +RUN <<_INSTALL_EMBY +set -e + +dnf install -y \ + nss \ + libXScrnSaver \ + alsa-lib \ + mesa-libgbm \ + gtk3 \ + libsecret \ + libnotify \ + at-spi2-core \ + libdrm \ + libxkbcommon \ + libXcomposite \ + libXdamage \ + libXrandr \ + libxshmfence \ + cups-libs \ + xdg-utils \ + curl \ + jq + +URL=$(curl -fsSL https://api.github.com/repos/MediaBrowser/emby-theater-electron/releases/latest \ + | jq -r '.assets[] | select(.name | test("^emby-theater-rpm_.*_x86_64\\.rpm$")) | .browser_download_url' \ + | head -n1) + +if [ -z "$URL" ] || [ "$URL" = "null" ]; then + echo "Failed to resolve Emby Theater .rpm download URL" >&2 + exit 1 +fi + +curl -fsSL -o /tmp/emby-theater.rpm "$URL" +dnf install -y /tmp/emby-theater.rpm +rm -f /tmp/emby-theater.rpm + +dnf clean all +_INSTALL_EMBY + +COPY --chmod=777 scripts/startup.sh /opt/gow/startup-app.sh + +ENV XDG_RUNTIME_DIR=/tmp/.X11-unix + +ARG IMAGE_SOURCE +LABEL org.opencontainers.image.source=$IMAGE_SOURCE diff --git a/apps/emby/build-fedora/scripts/startup.sh b/apps/emby/build-fedora/scripts/startup.sh new file mode 100644 index 00000000..36e19259 --- /dev/null +++ b/apps/emby/build-fedora/scripts/startup.sh @@ -0,0 +1,5 @@ +#!/bin/bash +set -e + +source /opt/gow/launch-comp.sh +launcher /usr/bin/emby-theater diff --git a/apps/emby/build/Dockerfile b/apps/emby/build/Dockerfile new file mode 100644 index 00000000..a690bf80 --- /dev/null +++ b/apps/emby/build/Dockerfile @@ -0,0 +1,55 @@ +# syntax=docker/dockerfile:1.4 +ARG BASE_APP_IMAGE + +# hadolint ignore=DL3006 +FROM ${BASE_APP_IMAGE} + +ARG DEBIAN_FRONTEND=noninteractive +ARG REQUIRED_PACKAGES=" \ + libnss3 \ + libxss1 \ + libasound2t64 \ + libgbm1 \ + libgtk-3-0 \ + libsecret-1-0 \ + libnotify4 \ + libatspi2.0-0 \ + libdrm2 \ + libxkbcommon0 \ + libxcomposite1 \ + libxdamage1 \ + libxrandr2 \ + libx11-xcb1 \ + libxshmfence1 \ + libcups2 \ + xdg-utils \ + " + +RUN <<_INSTALL_EMBY +set -e +apt-get update +apt-get install -y --no-install-recommends $REQUIRED_PACKAGES ca-certificates curl jq + +URL=$(curl -fsSL https://api.github.com/repos/MediaBrowser/emby-theater-electron/releases/latest \ + | jq -r '.assets[] | select(.name | test("^emby-theater-deb_.*_amd64\\.deb$")) | .browser_download_url' \ + | head -n1) + +if [ -z "$URL" ] || [ "$URL" = "null" ]; then + echo "Failed to resolve Emby Theater .deb download URL" >&2 + exit 1 +fi + +curl -fsSL -o /tmp/emby-theater.deb "$URL" +apt-get install -y /tmp/emby-theater.deb +rm -f /tmp/emby-theater.deb + +apt-get autoremove -y +rm -rf /var/lib/apt/lists/* +_INSTALL_EMBY + +COPY --chmod=777 scripts/startup.sh /opt/gow/startup-app.sh + +ENV XDG_RUNTIME_DIR=/tmp/.X11-unix + +ARG IMAGE_SOURCE +LABEL org.opencontainers.image.source=$IMAGE_SOURCE diff --git a/apps/emby/build/scripts/startup.sh b/apps/emby/build/scripts/startup.sh new file mode 100644 index 00000000..36e19259 --- /dev/null +++ b/apps/emby/build/scripts/startup.sh @@ -0,0 +1,5 @@ +#!/bin/bash +set -e + +source /opt/gow/launch-comp.sh +launcher /usr/bin/emby-theater diff --git a/apps/plex/_index.md b/apps/plex/_index.md new file mode 100644 index 00000000..24fb2882 --- /dev/null +++ b/apps/plex/_index.md @@ -0,0 +1,9 @@ +# Plex + +Plex HTPC — the official living-room media client for Plex. Streams movies, +TV, music, and live TV from any Plex Media Server with a 10-foot UI optimised +for gamepad and remote control. + +Plex distributes HTPC on Linux exclusively via Flathub (`tv.plex.PlexHTPC`), +so this image installs it from Flathub at build time. The runtime launches +it with `flatpak run tv.plex.PlexHTPC`. diff --git a/apps/plex/assets/wolf.config.toml b/apps/plex/assets/wolf.config.toml new file mode 100644 index 00000000..3ee30842 --- /dev/null +++ b/apps/plex/assets/wolf.config.toml @@ -0,0 +1,23 @@ +[[apps]] +title = "Plex" +icon_png_path = "https://games-on-whales.github.io/wildlife/apps/plex/assets/icon.png" + +[apps.runner] +type = "docker" +name = "WolfPlex" +image = "ghcr.io/games-on-whales/plex:edge" +mounts = [] +env = ["RUN_SWAY=1", "GOW_REQUIRED_DEVICES=/dev/input/* /dev/dri/* /dev/nvidia*"] +devices = [] +ports = [] +base_create_json = """ +{ + "HostConfig": { + "IpcMode": "host", + "Privileged": false, + "CapAdd": ["NET_RAW", "MKNOD", "NET_ADMIN"], + "DeviceCgroupRules": ["c 13:* rmw", "c 244:* rmw"] + } +} +\ +""" diff --git a/apps/plex/build-fedora/Dockerfile b/apps/plex/build-fedora/Dockerfile new file mode 100644 index 00000000..f9d47b63 --- /dev/null +++ b/apps/plex/build-fedora/Dockerfile @@ -0,0 +1,32 @@ +# syntax=docker/dockerfile:1.4 +ARG BASE_APP_IMAGE=ghcr.io/games-on-whales/base-app:fedora + +# hadolint ignore=DL3006 +FROM ${BASE_APP_IMAGE} + +# Plex HTPC on Linux is only officially distributed via Flathub — Plex does +# not publish any .deb/.rpm/AppImage, and the raw tarball at artifacts.plex.tv +# is behind Cloudflare bot-management that blocks standard HTTP clients. The +# only reliable install path is therefore `flatpak install` at build time. +RUN <<_INSTALL_PLEX_HTPC +set -e + +dnf install -y flatpak xdg-desktop-portal + +# bwrap needs to be setuid inside the container runtime. +chmod u+s /usr/bin/bwrap + +flatpak remote-add --system --if-not-exists \ + flathub https://dl.flathub.org/repo/flathub.flatpakrepo + +flatpak install --system -y --noninteractive flathub tv.plex.PlexHTPC + +dnf clean all +_INSTALL_PLEX_HTPC + +COPY --chmod=777 scripts/startup.sh /opt/gow/startup-app.sh + +ENV XDG_RUNTIME_DIR=/tmp/.X11-unix + +ARG IMAGE_SOURCE +LABEL org.opencontainers.image.source=$IMAGE_SOURCE diff --git a/apps/plex/build-fedora/scripts/startup.sh b/apps/plex/build-fedora/scripts/startup.sh new file mode 100644 index 00000000..6a3544b3 --- /dev/null +++ b/apps/plex/build-fedora/scripts/startup.sh @@ -0,0 +1,7 @@ +#!/bin/bash +set -e + +export XDG_DATA_DIRS=/var/lib/flatpak/exports/share:/usr/local/share:/usr/share + +source /opt/gow/launch-comp.sh +launcher flatpak run --branch=stable --arch=x86_64 --command=Plex tv.plex.PlexHTPC diff --git a/apps/plex/build/Dockerfile b/apps/plex/build/Dockerfile new file mode 100644 index 00000000..b5fc5418 --- /dev/null +++ b/apps/plex/build/Dockerfile @@ -0,0 +1,37 @@ +# syntax=docker/dockerfile:1.4 +ARG BASE_APP_IMAGE + +# hadolint ignore=DL3006 +FROM ${BASE_APP_IMAGE} + +ARG DEBIAN_FRONTEND=noninteractive + +# Plex HTPC on Linux is only officially distributed via Flathub — Plex does +# not publish any .deb/.rpm/AppImage, and the raw tarball at artifacts.plex.tv +# is behind Cloudflare bot-management that blocks standard HTTP clients. The +# only reliable install path is therefore `flatpak install` at build time. +RUN <<_INSTALL_PLEX_HTPC +set -e +apt-get update +apt-get install -y --no-install-recommends \ + ca-certificates flatpak xdg-desktop-portal + +# bwrap needs to be setuid inside the container runtime; other apps in this +# repo do the same thing for their flatpak flows. +chmod u+s /usr/bin/bwrap + +flatpak remote-add --system --if-not-exists \ + flathub https://dl.flathub.org/repo/flathub.flatpakrepo + +flatpak install --system -y --noninteractive flathub tv.plex.PlexHTPC + +apt-get autoremove -y +rm -rf /var/lib/apt/lists/* +_INSTALL_PLEX_HTPC + +COPY --chmod=777 scripts/startup.sh /opt/gow/startup-app.sh + +ENV XDG_RUNTIME_DIR=/tmp/.X11-unix + +ARG IMAGE_SOURCE +LABEL org.opencontainers.image.source=$IMAGE_SOURCE diff --git a/apps/plex/build/scripts/startup.sh b/apps/plex/build/scripts/startup.sh new file mode 100644 index 00000000..6a3544b3 --- /dev/null +++ b/apps/plex/build/scripts/startup.sh @@ -0,0 +1,7 @@ +#!/bin/bash +set -e + +export XDG_DATA_DIRS=/var/lib/flatpak/exports/share:/usr/local/share:/usr/share + +source /opt/gow/launch-comp.sh +launcher flatpak run --branch=stable --arch=x86_64 --command=Plex tv.plex.PlexHTPC diff --git a/apps/youtube/_index.md b/apps/youtube/_index.md new file mode 100644 index 00000000..377c72cc --- /dev/null +++ b/apps/youtube/_index.md @@ -0,0 +1,9 @@ +# YouTube (ad-free) + +[FreeTube](https://freetubeapp.io/) is an open-source desktop YouTube client +that plays videos without ads, tracking, or a Google account. It uses the +[Invidious](https://invidious.io/) and [Local API](https://github.com/TeamPiped/piped) +back-ends so no requests go to YouTube directly. + +This image installs the upstream FreeTube Electron build from its GitHub +releases and launches it full-screen on top of Sway. diff --git a/apps/youtube/assets/wolf.config.toml b/apps/youtube/assets/wolf.config.toml new file mode 100644 index 00000000..da3b96d0 --- /dev/null +++ b/apps/youtube/assets/wolf.config.toml @@ -0,0 +1,23 @@ +[[apps]] +title = "YouTube" +icon_png_path = "https://games-on-whales.github.io/wildlife/apps/youtube/assets/icon.png" + +[apps.runner] +type = "docker" +name = "WolfYouTube" +image = "ghcr.io/games-on-whales/youtube:edge" +mounts = [] +env = ["RUN_SWAY=1", "GOW_REQUIRED_DEVICES=/dev/input/* /dev/dri/* /dev/nvidia*"] +devices = [] +ports = [] +base_create_json = """ +{ + "HostConfig": { + "IpcMode": "host", + "Privileged": false, + "CapAdd": ["NET_RAW", "MKNOD", "NET_ADMIN"], + "DeviceCgroupRules": ["c 13:* rmw", "c 244:* rmw"] + } +} +\ +""" diff --git a/apps/youtube/build-fedora/Dockerfile b/apps/youtube/build-fedora/Dockerfile new file mode 100644 index 00000000..62ac76b9 --- /dev/null +++ b/apps/youtube/build-fedora/Dockerfile @@ -0,0 +1,51 @@ +# syntax=docker/dockerfile:1.4 +ARG BASE_APP_IMAGE=ghcr.io/games-on-whales/base-app:fedora + +# hadolint ignore=DL3006 +FROM ${BASE_APP_IMAGE} + +RUN <<_INSTALL_FREETUBE +set -e + +dnf install -y \ + nss \ + libXScrnSaver \ + alsa-lib \ + mesa-libgbm \ + gtk3 \ + libsecret \ + libnotify \ + at-spi2-core \ + libdrm \ + libxkbcommon \ + libXcomposite \ + libXdamage \ + libXrandr \ + libxshmfence \ + cups-libs \ + xdg-utils \ + curl \ + jq + +URL=$(curl -fsSL "https://api.github.com/repos/FreeTubeApp/FreeTube/releases?per_page=1" \ + | jq -r '.[0].assets[] | select(.name | test("amd64\\.rpm$")) | .browser_download_url' \ + | head -n1) + +if [ -z "$URL" ] || [ "$URL" = "null" ]; then + echo "Failed to resolve FreeTube .rpm download URL" >&2 + exit 1 +fi + +curl -fsSL -o /tmp/freetube.rpm "$URL" +dnf install -y /tmp/freetube.rpm +rm -f /tmp/freetube.rpm + +dnf clean all +_INSTALL_FREETUBE + +COPY --chmod=777 scripts/startup.sh /opt/gow/startup-app.sh + +ENV XDG_RUNTIME_DIR=/tmp/.X11-unix + +ARG IMAGE_SOURCE +LABEL org.opencontainers.image.source=$IMAGE_SOURCE diff --git a/apps/youtube/build-fedora/scripts/startup.sh b/apps/youtube/build-fedora/scripts/startup.sh new file mode 100644 index 00000000..58d97933 --- /dev/null +++ b/apps/youtube/build-fedora/scripts/startup.sh @@ -0,0 +1,5 @@ +#!/bin/bash +set -e + +source /opt/gow/launch-comp.sh +launcher /usr/bin/freetube --no-sandbox diff --git a/apps/youtube/build/Dockerfile b/apps/youtube/build/Dockerfile new file mode 100644 index 00000000..48a9f4b9 --- /dev/null +++ b/apps/youtube/build/Dockerfile @@ -0,0 +1,55 @@ +# syntax=docker/dockerfile:1.4 +ARG BASE_APP_IMAGE + +# hadolint ignore=DL3006 +FROM ${BASE_APP_IMAGE} + +ARG DEBIAN_FRONTEND=noninteractive +ARG REQUIRED_PACKAGES=" \ + libnss3 \ + libxss1 \ + libasound2t64 \ + libgbm1 \ + libgtk-3-0 \ + libsecret-1-0 \ + libnotify4 \ + libatspi2.0-0 \ + libdrm2 \ + libxkbcommon0 \ + libxcomposite1 \ + libxdamage1 \ + libxrandr2 \ + libx11-xcb1 \ + libxshmfence1 \ + libcups2 \ + xdg-utils \ + " + +RUN <<_INSTALL_FREETUBE +set -e +apt-get update +apt-get install -y --no-install-recommends $REQUIRED_PACKAGES ca-certificates curl jq + +URL=$(curl -fsSL "https://api.github.com/repos/FreeTubeApp/FreeTube/releases?per_page=1" \ + | jq -r '.[0].assets[] | select(.name | test("amd64\\.deb$")) | .browser_download_url' \ + | head -n1) + +if [ -z "$URL" ] || [ "$URL" = "null" ]; then + echo "Failed to resolve FreeTube .deb download URL" >&2 + exit 1 +fi + +curl -fsSL -o /tmp/freetube.deb "$URL" +apt-get install -y /tmp/freetube.deb +rm -f /tmp/freetube.deb + +apt-get autoremove -y +rm -rf /var/lib/apt/lists/* +_INSTALL_FREETUBE + +COPY --chmod=777 scripts/startup.sh /opt/gow/startup-app.sh + +ENV XDG_RUNTIME_DIR=/tmp/.X11-unix + +ARG IMAGE_SOURCE +LABEL org.opencontainers.image.source=$IMAGE_SOURCE diff --git a/apps/youtube/build/scripts/startup.sh b/apps/youtube/build/scripts/startup.sh new file mode 100644 index 00000000..58d97933 --- /dev/null +++ b/apps/youtube/build/scripts/startup.sh @@ -0,0 +1,5 @@ +#!/bin/bash +set -e + +source /opt/gow/launch-comp.sh +launcher /usr/bin/freetube --no-sandbox