Add youtubedl-Material Container (#374)

This commit is contained in:
Kjeld Schouten-Lebbing 2021-04-17 17:01:43 +02:00 committed by GitHub
parent 6af2bb3cee
commit a9a7eaf82e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 96 additions and 1 deletions

1
.containers/apps/ombi/latest-base.sh Normal file → Executable file
View File

@ -1 +1,2 @@
#!/usr/bin/env bash
cat "./.containers/base/ubuntu/VERSION"

View File

@ -0,0 +1 @@
focal-20210401

View File

@ -0,0 +1,67 @@
# hadolint ignore=DL3007
FROM ghcr.io/truecharts/ubuntu:latest
ENV NO_UPDATE_NOTIFIER=true
ENV NODE_ENV=production
ENV APP_DIR="/app"
ARG TARGETPLATFORM
ARG BUILDPLATFORM
ARG VERSION
# hadolint ignore=DL3002
USER root
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# hadolint ignore=DL3008,DL3015,SC2086,SC2155,DL3003,DL3016
RUN \
apt-get -qq update \
&& \
apt-get -qq install -y \
nodejs \
youtube-dl \
ffmpeg \
unzip \
python \
npm \
ffmpeg \
atomicparsley \
&& \
mkdir -p /extract \
&& \
export URL="https://github.com/Tzahi12345/YoutubeDL-Material/releases/download/v${VERSION}/youtubedl-material-v${VERSION}.zip" \
&& curl -fsSL -o /tmp/youtubedl.zip "${URL}" \
&& unzip /tmp/youtubedl.zip -d /tmp \
&& rm -Rf /app || Skip deleting app directory \
&& cp -Rf /tmp/youtubedl-material /app \
&& printf "UpdateMethod=docker\nPackageVersion=%s\nPackageAuthor=[TrueCharts Project](https://truecharts.org)" "${VERSION}" > /app/package_info \
&& echo "==running NPM install==" \
&& cd /app \
&& npm install \
&& echo "==Running Cleanup ==" \
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
&& apt-get autoremove -y \
&& apt-get clean \
&& \
rm -rf \
/tmp/* \
/var/lib/apt/lists/* \
/var/tmp/ \
&& chmod -R u=rwX,go=rX /app \
&& chown -R apps:apps /app \
&& printf "umask %d" "${UMASK}" >> /etc/bash.bashrc \
&& update-ca-certificates
WORKDIR /app
VOLUME /app
USER apps
EXPOSE 17442
COPY ./.containers/apps/youtubedl/entrypoint.sh /entrypoint.sh
CMD [ "/entrypoint.sh" ]
LABEL "maintainer"="TrueCharts <info@truecharts.org>"
LABEL "authors"="TrueCharts <info@truecharts.org>"
LABEL "org.opencontainers.image.source"="https://github.com/truecharts/apps/tree/master/.containers/apps/youtubedl"
LABEL "org.opencontainers.image.documentation "="https://truecharts.org"

View File

@ -0,0 +1 @@
4.2

View File

@ -0,0 +1,3 @@
#!/usr/bin/env bash
exec node /app/app.js ${@} ${EXTRA_ARGS}

View File

@ -0,0 +1,14 @@
---
process:
node:
running: true
port:
tcp6:17442:
listening: true
# http:
# http://localhost:9117/UI/Login:
# status: 200
# body:
# - '<title>Jackett</title>'

View File

@ -0,0 +1,2 @@
#!/usr/bin/env bash
cat "./.containers/base/ubuntu/VERSION"

View File

@ -0,0 +1,6 @@
#!/usr/bin/env bash
version=$(curl -sX GET "https://api.github.com/reposTzahi12345/YoutubeDL-Material/releases" | jq --raw-output '.[0].tag_name')
version="${version#*v}"
version="${version#*release-}"
printf "%s" "${version}"

0
.containers/base/alpine/latest-version.sh Normal file → Executable file
View File

View File

@ -92,7 +92,7 @@ jobs:
fi
if [ "${{github.event_name}}" == "pull_request" ]; then
echo ::set-output name=push::false
echo ::set-output name=cache_from::"type=registry,ref=ghcr.io/${{ github.repository_owner }}/${{ matrix.container }}:buildcache"
echo ::set-output name=cache_from::"type=registry,ref=ghcr.io/${{ github.repository_owner }}/${{ matrix.container }}:buildcache" || echo ::set-output name=cache_from::""
echo ::set-output name=cache_to::""
else
echo ::set-output name=push::true