Use third-party containers as source (#367)

* try fetching ubuntu container from KAH

* test using github token

* oops

* fix container build process for PR's

* v

* whoopsies

* link Alpine to KAH

* try porting bazarr

* oops

* improve bazarr labeling

* need version before setting dockerfile

* Fix platform (as SCALE doesn't run on ARM officially)

* Cleanup all Apps related to KAH

* only update base if base exists and do so on an per-app basis
This commit is contained in:
Kjeld Schouten-Lebbing
2021-04-16 14:21:18 +02:00
committed by GitHub
parent 038bed661c
commit 99bb72cb13
83 changed files with 290 additions and 3707 deletions
-1
View File
@@ -1 +0,0 @@
focal-20210401
+17 -27
View File
@@ -1,43 +1,33 @@
# hadolint ignore=DL3007
FROM ghcr.io/truecharts/ubuntu:latest
ARG VERSION
FROM ghcr.io/k8s-at-home/readarr:v${VERSION}
ARG TARGETPLATFORM
USER root
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# hadolint ignore=DL3008,DL3015,SC2086
RUN \
apt-get -qq update \
usermod -l apps kah \
&& \
apt-get -qq install -y \
libicu66 \
groupmod -n apps kah \
&& chown -R apps:apps /config \
&& rm -rf /app/package_info \
&& \
curl -fsSL -o /tmp/readarr.tar.gz \
"https://readarr.servarr.com/v1/update/nightly/updatefile?version=${VERSION}&os=linux&runtime=netcore&arch=x64" \
&& tar ixzf /tmp/readarr.tar.gz -C /app --strip-components 1 \
&& \
rm -rf \
/app/readarr.Update* \
&& \
printf "UpdateMethod=docker\nBranch=nightly\nPackageVersion=%s\nPackageAuthor=[TrueCharts Project](https://truecharts.org)" "${VERSION}" > /app/package_info \
&& \
apt-get autoremove -y \
&& apt-get clean \
&& \
rm -rf \
/tmp/* \
/var/lib/apt/lists/* \
/var/tmp/ \
&& chmod -R u=rwX,go=rX /app \
&& printf "umask %d" "${UMASK}" >> /etc/bash.bashrc \
&& update-ca-certificates
printf "UpdateMethod=docker\nPackageVersion=%s\nPackageAuthor=[TrueCharts Project](https://truecharts.org)" "${VERSION}" > /app/package_info
USER apps
EXPOSE 8787
EXPOSE 6767
COPY ./.containers/apps/readarr/entrypoint.sh /entrypoint.sh
CMD ["/entrypoint.sh"]
LABEL "maintainer"="TrueCharts <info@truecharts.org>"
LABEL "org.opencontainers.image.source"="https://github.com/truecharts/apps"
LABEL "authors"="TrueCharts <info@truecharts.org>"
LABEL "org.opencontainers.image.source"="https://github.com/truecharts/apps/tree/master/.containers/apps/readarr"
LABEL "org.opencontainers.image.documentation "="https://truecharts.org"
-1
View File
@@ -1 +0,0 @@
linux/amd64
+3 -2
View File
@@ -1,6 +1,7 @@
#!/usr/bin/env bash
version=$(curl -fsSL "https://readarr.servarr.com/v1/update/nightly/changes?os=linux&runtime=netcore" | jq --raw-output '.[0].version')
TOKEN=$(curl https://ghcr.io/token\?scope\="repository:k8s-at-home/readarr:pull" | jq --raw-output '.[]')
version=$(curl -H "Authorization: Bearer ${TOKEN}" https://ghcr.io/v2/k8s-at-home/readarr/tags/list | jq --raw-output '.tags[]' | grep -v latest | grep -v buildcache | tail -n1)
version="${version#*v}"
version="${version#*release-}"
printf "%s" "${version}"
echo "${version}"