Skip to content

Commit 03e7122

Browse files
committed
feat: add new docker image without ffmpeg
1 parent 85f4e40 commit 03e7122

3 files changed

Lines changed: 39 additions & 4 deletions

File tree

.github/workflows/docker-image.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,26 @@ jobs:
3030
username: ${{github.actor}}
3131
password: ${{secrets.GHCR}}
3232

33-
- name: Build and Push the Docker image
33+
- name: Build and Push Full Image (with FFmpeg)
3434
run: |
3535
VERSION=${{ steps.version.outputs.version }}
36+
echo "Building full image with FFmpeg support..."
3637
docker build ./TelegramDownloader -f ./TelegramDownloader/Dockerfile \
3738
--build-arg VERSION=$VERSION \
39+
--build-arg INCLUDE_FFMPEG=true \
3840
--tag ghcr.io/mateof/telegramfilemanager:dev_$VERSION \
3941
--tag ghcr.io/mateof/telegramfilemanager:dev_latest
4042
docker push ghcr.io/mateof/telegramfilemanager:dev_$VERSION
4143
docker push ghcr.io/mateof/telegramfilemanager:dev_latest
44+
45+
- name: Build and Push Lite Image (without FFmpeg)
46+
run: |
47+
VERSION=${{ steps.version.outputs.version }}
48+
echo "Building lite image without FFmpeg..."
49+
docker build ./TelegramDownloader -f ./TelegramDownloader/Dockerfile \
50+
--build-arg VERSION=$VERSION \
51+
--build-arg INCLUDE_FFMPEG=false \
52+
--tag ghcr.io/mateof/telegramfilemanager:dev_$VERSION-lite \
53+
--tag ghcr.io/mateof/telegramfilemanager:dev_latest-lite
54+
docker push ghcr.io/mateof/telegramfilemanager:dev_$VERSION-lite
55+
docker push ghcr.io/mateof/telegramfilemanager:dev_latest-lite

.github/workflows/release-docker-image.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,26 @@ jobs:
2828
username: ${{github.actor}}
2929
password: ${{secrets.GHCR}}
3030

31-
- name: Build and Push the Docker image
31+
- name: Build and Push Full Image (with FFmpeg)
3232
run: |
3333
VERSION=${{ steps.version.outputs.version }}
34+
echo "Building full image with FFmpeg support..."
3435
docker build ./TelegramDownloader -f ./TelegramDownloader/Dockerfile \
3536
--build-arg VERSION=$VERSION \
37+
--build-arg INCLUDE_FFMPEG=true \
3638
--tag ghcr.io/mateof/telegramfilemanager:${{github.ref_name}} \
3739
--tag ghcr.io/mateof/telegramfilemanager:latest
3840
docker push ghcr.io/mateof/telegramfilemanager:${{github.ref_name}}
3941
docker push ghcr.io/mateof/telegramfilemanager:latest
42+
43+
- name: Build and Push Lite Image (without FFmpeg)
44+
run: |
45+
VERSION=${{ steps.version.outputs.version }}
46+
echo "Building lite image without FFmpeg..."
47+
docker build ./TelegramDownloader -f ./TelegramDownloader/Dockerfile \
48+
--build-arg VERSION=$VERSION \
49+
--build-arg INCLUDE_FFMPEG=false \
50+
--tag ghcr.io/mateof/telegramfilemanager:${{github.ref_name}}-lite \
51+
--tag ghcr.io/mateof/telegramfilemanager:latest-lite
52+
docker push ghcr.io/mateof/telegramfilemanager:${{github.ref_name}}-lite
53+
docker push ghcr.io/mateof/telegramfilemanager:latest-lite

TelegramDownloader/Dockerfile

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,16 @@ WORKDIR /app
66
EXPOSE 80
77
EXPOSE 443
88

9+
# Build argument to optionally include FFmpeg (default: true)
10+
# Set to "false" to create a lighter image without video transcoding support
11+
ARG INCLUDE_FFMPEG=true
12+
913
# Install ICU libraries for globalization support (required by BlazorBootstrap NumberInput)
10-
# Install FFmpeg for video transcoding support (MKV, AVI, WMV, etc.)
11-
RUN apk add --no-cache icu-libs ffmpeg
14+
# Optionally install FFmpeg for video transcoding support (MKV, AVI, WMV, etc.)
15+
RUN apk add --no-cache icu-libs && \
16+
if [ "$INCLUDE_FFMPEG" = "true" ]; then \
17+
apk add --no-cache ffmpeg; \
18+
fi
1219
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false
1320

1421
FROM mcr.microsoft.com/dotnet/sdk:10.0-alpine AS build

0 commit comments

Comments
 (0)