Skip to content

Commit af28d05

Browse files
authored
Dev (#9)
2 parents ab8c677 + 17e6609 commit af28d05

3 files changed

Lines changed: 45 additions & 15 deletions

File tree

.github/workflows/docker_publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ jobs:
8989
BUILD_CONFIGURATION=ApacheCouchDB_Release
9090
VERSION=${{ github.ref_name }}
9191
RELEASE=${{ github.run_number }}
92-
platforms: linux/amd64,linux/arm64
92+
platforms: linux/amd64 # ,linux/arm64
9393
# Cache to regietry instead of gha to avoid the capacity limit.
9494
cache-from: type=registry,ref=ghcr.io/recorder-moe/livestreamrecorderservice:cache
9595
cache-to: type=registry,ref=ghcr.io/recorder-moe/livestreamrecorderservice:cache,mode=max
@@ -122,7 +122,7 @@ jobs:
122122
BUILD_CONFIGURATION=AzureCosmosDB_Release
123123
VERSION=${{ github.ref_name }}
124124
RELEASE=${{ github.run_number }}
125-
platforms: linux/amd64,linux/arm64
125+
platforms: linux/amd64 # ,linux/arm64
126126
# Cache to regietry instead of gha to avoid the capacity limit.
127127
cache-from: type=registry,ref=ghcr.io/recorder-moe/livestreamrecorderservice:cache
128128
cache-to: type=registry,ref=ghcr.io/recorder-moe/livestreamrecorderservice:cache,mode=max

.github/workflows/docker_publish_dev.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ jobs:
8787
BUILD_CONFIGURATION=ApacheCouchDB_Release
8888
VERSION=${{ github.ref_name }}
8989
RELEASE=${{ github.run_number }}
90-
platforms: linux/amd64,linux/arm64
90+
platforms: linux/amd64 # ,linux/arm64
9191
# Cache to regietry instead of gha to avoid the capacity limit.
9292
cache-from: type=registry,ref=ghcr.io/recorder-moe/livestreamrecorderservice:cache
9393
cache-to: type=registry,ref=ghcr.io/recorder-moe/livestreamrecorderservice:cache,mode=max
@@ -120,7 +120,7 @@ jobs:
120120
BUILD_CONFIGURATION=AzureCosmosDB_Release
121121
VERSION=${{ github.ref_name }}
122122
RELEASE=${{ github.run_number }}
123-
platforms: linux/amd64,linux/arm64
123+
platforms: linux/amd64 # ,linux/arm64
124124
# Cache to regietry instead of gha to avoid the capacity limit.
125125
cache-from: type=registry,ref=ghcr.io/recorder-moe/livestreamrecorderservice:cache
126126
cache-to: type=registry,ref=ghcr.io/recorder-moe/livestreamrecorderservice:cache,mode=max

Dockerfile

Lines changed: 41 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,34 +3,53 @@ ARG UID=1654
33
ARG VERSION=EDGE
44
ARG RELEASE=0
55
ARG BUILD_CONFIGURATION=ApacheCouchDB_Release
6-
ARG YTDLP_VERSION=2025.08.22
6+
ARG YTDLP_VERSION=2025.12.08
77

88
########################################
99
# Debug stage
1010
########################################
11-
FROM mcr.microsoft.com/dotnet/runtime:8.0-alpine AS debug
11+
FROM mcr.microsoft.com/dotnet/runtime:8.0 AS debug
1212

1313
WORKDIR /app
1414

1515
# RUN mount cache for multi-arch: https://github.com/docker/buildx/issues/549#issuecomment-1788297892
1616
ARG TARGETARCH
1717
ARG TARGETVARIANT
1818

19+
ARG UID
20+
21+
# Create directories with correct permissions
22+
RUN install -d -m 775 -o $UID -g 0 /etc/yt-dlp-plugins/bgutil-ytdlp-pot-provider && \
23+
install -d -m 775 -o $UID -g 0 /deno-dir
24+
1925
# ffmpeg and ffprobe
2026
COPY --link --from=ghcr.io/jim60105/static-ffmpeg-upx:8.0 /ffmpeg /usr/bin/
2127
COPY --link --from=ghcr.io/jim60105/static-ffmpeg-upx:8.0 /ffprobe /usr/bin/
2228

2329
# dumb-init
2430
COPY --link --from=ghcr.io/jim60105/static-ffmpeg-upx:8.0 /dumb-init /usr/bin/
2531

26-
# yt-dlp
32+
# Copy POToken server (bgutil-pot)
33+
COPY --link --chown=$UID:0 --chmod=775 --from=ghcr.io/jim60105/bgutil-pot:latest /bgutil-pot /usr/bin/
34+
35+
# Copy POToken client plugin
36+
COPY --link --chown=$UID:0 --chmod=775 --from=ghcr.io/jim60105/bgutil-pot:latest /client /etc/yt-dlp-plugins/bgutil-ytdlp-pot-provider
37+
38+
# yt-dlp (using Linux build for Debian with glibc)
2739
ARG YTDLP_VERSION
2840
ADD --link --chown=root:0 --chmod=755 https://github.com/yt-dlp/yt-dlp/releases/download/${YTDLP_VERSION}/yt-dlp_linux /usr/bin/yt-dlp
2941

42+
# Deno JS runtime for yt-dlp
43+
ENV DENO_USE_CGROUPS=1 \
44+
DENO_DIR=/deno-dir/ \
45+
DENO_INSTALL_ROOT=/usr/local
46+
47+
COPY --link --chown=$UID:0 --chmod=775 --from=docker.io/denoland/deno:bin /deno /usr/bin/
48+
3049
########################################
3150
# Build stage
3251
########################################
33-
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0-alpine AS build
52+
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0 AS build
3453

3554
WORKDIR /source
3655

@@ -53,7 +72,7 @@ RUN --mount=source=.,target=.,rw \
5372
########################################
5473
# Final stage
5574
########################################
56-
FROM alpine:3 AS final
75+
FROM mcr.microsoft.com/dotnet/runtime-deps:8.0 AS final
5776

5877
# RUN mount cache for multi-arch: https://github.com/docker/buildx/issues/549#issuecomment-1788297892
5978
ARG TARGETARCH
@@ -65,14 +84,12 @@ ENV APP_UID=$UID
6584
ENV DOTNET_RUNNING_IN_CONTAINER=true
6685
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=true
6786

68-
RUN --mount=type=cache,id=apk-$TARGETARCH$TARGETVARIANT,sharing=locked,target=/var/cache/apk \
69-
apk update && apk add -u \
70-
ca-certificates-bundle libgcc libssl3 libstdc++ zlib
71-
7287
# Create directories with correct permissions
7388
RUN install -d -m 775 -o $UID -g 0 /app && \
7489
install -d -m 775 -o $UID -g 0 /licenses && \
75-
install -d -m 775 -o $UID -g 0 /.cache
90+
install -d -m 775 -o $UID -g 0 /.cache && \
91+
install -d -m 775 -o $UID -g 0 /etc/yt-dlp-plugins/bgutil-ytdlp-pot-provider && \
92+
install -d -m 775 -o $UID -g 0 /deno-dir
7693

7794
# Copy licenses (OpenShift Policy)
7895
COPY --link --chown=$UID:0 --chmod=775 LICENSE /licenses/LICENSE
@@ -85,10 +102,23 @@ COPY --link --from=ghcr.io/jim60105/static-ffmpeg-upx:8.0 /ffprobe /usr/bin/
85102
# dumb-init
86103
COPY --link --from=ghcr.io/jim60105/static-ffmpeg-upx:8.0 /dumb-init /usr/bin/
87104

88-
# yt-dlp
105+
# Copy POToken server (bgutil-pot)
106+
COPY --link --chown=$UID:0 --chmod=775 --from=ghcr.io/jim60105/bgutil-pot:latest /bgutil-pot /usr/bin/
107+
108+
# Copy POToken client plugin
109+
COPY --link --chown=$UID:0 --chmod=775 --from=ghcr.io/jim60105/bgutil-pot:latest /client /etc/yt-dlp-plugins/bgutil-ytdlp-pot-provider
110+
111+
# yt-dlp (using Linux build for Debian with glibc)
89112
ARG YTDLP_VERSION
90113
ADD --link --chown=$UID:0 --chmod=775 https://github.com/yt-dlp/yt-dlp/releases/download/${YTDLP_VERSION}/yt-dlp_linux /usr/bin/yt-dlp
91114

115+
# Deno JS runtime for yt-dlp
116+
ENV DENO_USE_CGROUPS=1 \
117+
DENO_DIR=/deno-dir/ \
118+
DENO_INSTALL_ROOT=/usr/local
119+
120+
COPY --link --chown=$UID:0 --chmod=775 --from=docker.io/denoland/deno:bin /deno /usr/bin/
121+
92122
COPY --link --chown=$UID:0 --chmod=775 --from=publish /app /app
93123

94124
ENV PATH="/app:$PATH"

0 commit comments

Comments
 (0)