mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-09-08 10:49:09 +02:00
* feat(free_games_claimer): update upstream remaster to 1.6 Bumps the pinned Free-Games-Claimer-Remaster commit from 1.1 to the 1.6 release, adding the Ubisoft, Fab, AliExpress and Epic mobile stores, fixed daily scheduler times and the --accept-lang detection fix. Mirrors upstream's Chromium hardening (no-op xdg-open plus an AutoLaunchProtocolsFromOrigins managed policy) so app-scheme links cannot block the VNC session, and defaults upstream's release-update notification off because it advises "docker compose pull" instead of the add-on store. Closes #2990 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * feat(free_games_claimer): track upstream releases instead of a pinned commit The Dockerfile pinned upstream by commit SHA, which the repository updater cannot bump, so updater.json was paused and every upstream release needed a manual edit. Replaces the SHA with ARG BUILD_UPSTREAM="1.6" -- the repo-wide idiom the updater rewrites -- and downloads the matching v<version> source tarball. Unpauses updater.json and excludes upstream's development tags (v1.7d and similar), which carry no GitHub release. The add-on keeps its own 2.x version series: ha_version.py derives a strictly newer add-on version (2.1.0 -> 2.1.1) from a lower-sorting upstream tag, so Home Assistant still offers the update. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * fix(free_games_claimer): survive an upstream tag naming change lastversion reports upstream's v1.7d development tag as release "1.7", for which GitHub serves no source archive; "github_exclude": "d" keeps it out of the updater's reach. As a second line of defence the build now also tries the tag name without the "v" prefix, so an unattended version bump cannot break the image build on a tag naming change alone. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * docs(free_games_claimer): make the description's store list explicitly partial The shortened description named a subset of the supported stores, which both review bots read as an inaccurate list. "and more" says the list is partial while keeping the line inside the 80 column limit. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * docs(free_games_claimer): state the mutable-tag trade-off honestly The comment and README carried over a claim from the commit-pin era: that the image contents cannot change without a version bump. A release tag is mutable, so that is no longer true. Say what actually holds and why the trade-off is accepted. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * fix(free_games_claimer): stop the upstream label guessing the tag form io.hass.upstream named the v-prefixed tag, which is wrong on the path where the build falls back to the unprefixed archive. Point it at the releases list, which is correct either way; the installed release is already recorded in updater.json, CHANGELOG.md and the startup banner. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
168 lines
7.2 KiB
Docker
168 lines
7.2 KiB
Docker
#============================#
|
|
# ALEXBELGIUM'S DOCKERFILE #
|
|
#============================#
|
|
#=== Home Assistant Add-on ===#
|
|
|
|
ARG BUILD_FROM="debian:bookworm-slim"
|
|
FROM ${BUILD_FROM}
|
|
|
|
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
|
|
|
ARG DEBIAN_FRONTEND="noninteractive"
|
|
ARG BUILD_ARCH
|
|
ARG BUILD_DATE
|
|
ARG BUILD_DESCRIPTION
|
|
ARG BUILD_NAME
|
|
ARG BUILD_REF
|
|
ARG BUILD_REPOSITORY
|
|
ARG BUILD_VERSION
|
|
ARG UPSTREAM_REPOSITORY="P-Adamiec/Free-Games-Claimer-Remaster"
|
|
ARG BUILD_UPSTREAM="1.6"
|
|
|
|
ENV S6_CMD_WAIT_FOR_SERVICES="1" \
|
|
S6_CMD_WAIT_FOR_SERVICES_MAXTIME="0" \
|
|
S6_SERVICES_GRACETIME="0" \
|
|
VNC_PORT="5900" \
|
|
NOVNC_PORT="6080" \
|
|
WIDTH="1280" \
|
|
HEIGHT="720" \
|
|
DEPTH="24" \
|
|
SHOW="1"
|
|
|
|
# Install the dependencies used by Free Games Claimer Remaster. The upstream
|
|
# Dockerfile supports both amd64 (Google Chrome) and arm64 (Chromium), so the
|
|
# add-on keeps its existing multi-architecture support.
|
|
RUN apt-get update \
|
|
&& apt-get install -y --no-install-recommends \
|
|
ca-certificates \
|
|
curl \
|
|
dos2unix \
|
|
gnupg \
|
|
gzip \
|
|
jq \
|
|
python3 \
|
|
python3-pip \
|
|
tar \
|
|
tini \
|
|
&& mkdir -p /etc/apt/keyrings \
|
|
&& curl --proto "=https" --tlsv1.2 -fsSL https://packagecloud.io/dcommander/virtualgl/gpgkey \
|
|
| gpg --dearmor -o /etc/apt/trusted.gpg.d/VirtualGL.gpg \
|
|
&& curl --proto "=https" --tlsv1.2 -fsSL https://packagecloud.io/dcommander/turbovnc/gpgkey \
|
|
| gpg --dearmor -o /etc/apt/trusted.gpg.d/TurboVNC.gpg \
|
|
&& curl --proto "=https" --tlsv1.2 -fsSL https://raw.githubusercontent.com/VirtualGL/repo/main/VirtualGL.list \
|
|
> /etc/apt/sources.list.d/VirtualGL.list \
|
|
&& curl --proto "=https" --tlsv1.2 -fsSL https://raw.githubusercontent.com/TurboVNC/repo/main/TurboVNC.list \
|
|
> /etc/apt/sources.list.d/TurboVNC.list \
|
|
&& apt-get update \
|
|
&& apt-get install -y --no-install-recommends \
|
|
novnc \
|
|
ratpoison \
|
|
turbovnc \
|
|
virtualgl \
|
|
websockify \
|
|
libasound2 \
|
|
libatk-bridge2.0-0 \
|
|
libatk1.0-0 \
|
|
libatspi2.0-0 \
|
|
libcairo2 \
|
|
libcups2 \
|
|
libgbm1 \
|
|
libnspr4 \
|
|
libnss3 \
|
|
libpango-1.0-0 \
|
|
libxcomposite1 \
|
|
libxdamage1 \
|
|
libxfixes3 \
|
|
libxkbcommon0 \
|
|
&& if [ "$(dpkg --print-architecture)" = "amd64" ]; then \
|
|
curl -fsSL https://dl.google.com/linux/linux_signing_key.pub \
|
|
| gpg --dearmor -o /etc/apt/keyrings/google-chrome.gpg; \
|
|
echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/google-chrome.gpg] https://dl.google.com/linux/chrome/deb/ stable main" \
|
|
> /etc/apt/sources.list.d/google-chrome.list; \
|
|
apt-get update; \
|
|
apt-get install -y --no-install-recommends google-chrome-stable; \
|
|
else \
|
|
apt-get install -y --no-install-recommends chromium; \
|
|
fi \
|
|
&& printf '#!/bin/sh\nexit 0\n' > /usr/bin/xdg-open \
|
|
&& chmod +x /usr/bin/xdg-open \
|
|
&& mkdir -p /etc/opt/chrome/policies/managed /etc/chromium/policies/managed \
|
|
&& printf '%s\n' '{"AutoLaunchProtocolsFromOrigins":[{"protocol":"aliexpress","allowed_origins":["*"]},{"protocol":"aliexpresshd","allowed_origins":["*"]},{"protocol":"aecmd","allowed_origins":["*"]},{"protocol":"alibaba","allowed_origins":["*"]},{"protocol":"alipay","allowed_origins":["*"]},{"protocol":"alipays","allowed_origins":["*"]},{"protocol":"tmall","allowed_origins":["*"]},{"protocol":"taobao","allowed_origins":["*"]},{"protocol":"market","allowed_origins":["*"]},{"protocol":"intent","allowed_origins":["*"]}]}' \
|
|
| tee /etc/opt/chrome/policies/managed/fgc-autolaunch.json /etc/chromium/policies/managed/fgc-autolaunch.json > /dev/null \
|
|
&& ln -sf /usr/share/novnc/vnc_auto.html /usr/share/novnc/index.html \
|
|
&& ln -sf /usr/bin/python3 /usr/bin/python \
|
|
&& apt-get purge -y gnupg \
|
|
&& apt-get autoremove -y \
|
|
&& apt-get clean \
|
|
&& rm -rf /var/lib/apt/lists/* /var/cache/* /var/tmp/* /tmp/* /usr/share/doc/*
|
|
|
|
# Install the upstream release named by BUILD_UPSTREAM. The repository updater
|
|
# bumps that value together with the add-on version. A release tag is a mutable
|
|
# reference: rebuilding the same BUILD_UPSTREAM installs whatever the tag points
|
|
# at today, which is the accepted cost of tracking upstream automatically.
|
|
# Upstream tags its releases "v1.6", but the tag name is downloaded without the
|
|
# prefix as well so that an unattended update does not fail the build if
|
|
# upstream ever drops it.
|
|
WORKDIR /fgc
|
|
RUN (curl --proto "=https" --tlsv1.2 -fsSL \
|
|
"https://github.com/${UPSTREAM_REPOSITORY}/archive/v${BUILD_UPSTREAM}.tar.gz" \
|
|
-o /tmp/free-games-claimer-remaster.tar.gz \
|
|
|| curl --proto "=https" --tlsv1.2 -fsSL \
|
|
"https://github.com/${UPSTREAM_REPOSITORY}/archive/${BUILD_UPSTREAM}.tar.gz" \
|
|
-o /tmp/free-games-claimer-remaster.tar.gz) \
|
|
&& tar -xzf /tmp/free-games-claimer-remaster.tar.gz --strip-components=1 -C /fgc \
|
|
&& python3 -m pip install --no-cache-dir --break-system-packages -r requirements.txt \
|
|
&& dos2unix ./*.sh \
|
|
&& chmod +x ./*.sh \
|
|
&& cp docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh \
|
|
&& chmod 0755 /usr/local/bin/docker-entrypoint.sh \
|
|
&& rm -f /tmp/free-games-claimer-remaster.tar.gz \
|
|
&& rm -rf /fgc/data \
|
|
&& ln -s /data /fgc/data
|
|
|
|
# Add Home Assistant integration files and shared helper modules.
|
|
COPY rootfs/ /
|
|
RUN find /etc/cont-init.d /usr/local/bin -type f -name "*.sh" -exec chmod 0755 {} + \
|
|
&& chmod 0755 /usr/local/bin/migrate_vogler_data.py
|
|
|
|
ARG MODULES="00-banner.sh 01-custom_script.sh"
|
|
COPY ha_automodules.sh /ha_automodules.sh
|
|
RUN chmod 0755 /ha_automodules.sh \
|
|
&& /ha_automodules.sh "${MODULES}" \
|
|
&& rm /ha_automodules.sh
|
|
|
|
ENV PACKAGES=""
|
|
COPY ha_autoapps.sh /ha_autoapps.sh
|
|
RUN chmod 0755 /ha_autoapps.sh \
|
|
&& /ha_autoapps.sh "${PACKAGES}" \
|
|
&& rm /ha_autoapps.sh
|
|
|
|
ENV S6_STAGE2_HOOK="/ha_entrypoint.sh"
|
|
COPY ha_entrypoint.sh /ha_entrypoint.sh
|
|
COPY bashio-standalone.sh /usr/local/lib/bashio-standalone.sh
|
|
RUN chmod 0755 /ha_entrypoint.sh /usr/local/lib/bashio-standalone.sh
|
|
|
|
EXPOSE 5900 6080
|
|
ENTRYPOINT ["/usr/bin/env"]
|
|
CMD ["/ha_entrypoint.sh"]
|
|
|
|
LABEL \
|
|
io.hass.name="${BUILD_NAME}" \
|
|
io.hass.description="${BUILD_DESCRIPTION}" \
|
|
io.hass.arch="${BUILD_ARCH}" \
|
|
io.hass.type="addon" \
|
|
io.hass.version="${BUILD_VERSION}" \
|
|
maintainer="alexbelgium (https://github.com/alexbelgium)" \
|
|
org.opencontainers.image.title="${BUILD_NAME}" \
|
|
org.opencontainers.image.description="${BUILD_DESCRIPTION}" \
|
|
org.opencontainers.image.vendor="Home Assistant Add-ons" \
|
|
org.opencontainers.image.authors="alexbelgium (https://github.com/alexbelgium)" \
|
|
org.opencontainers.image.licenses="AGPL-3.0" \
|
|
org.opencontainers.image.url="https://github.com/${BUILD_REPOSITORY}" \
|
|
org.opencontainers.image.source="https://github.com/${BUILD_REPOSITORY}" \
|
|
org.opencontainers.image.documentation="https://github.com/${BUILD_REPOSITORY}/blob/master/free_games_claimer/README.md" \
|
|
org.opencontainers.image.created="${BUILD_DATE}" \
|
|
org.opencontainers.image.revision="${BUILD_REF}" \
|
|
org.opencontainers.image.version="${BUILD_VERSION}" \
|
|
io.hass.upstream="https://github.com/${UPSTREAM_REPOSITORY}/releases"
|