diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 13d937d3..7cbe7f06 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -67,10 +67,17 @@ jobs: type=semver,pattern={{version}} type=semver,pattern={{major}}.{{minor}} + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Build and push Docker image - uses: docker/build-push-action@v5 + uses: docker/build-push-action@v6 with: context: . push: ${{ github.event_name != 'pull_request' }} # Don't push on pull requests tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} + platforms: linux/amd64,linux/arm64 diff --git a/Dockerfile b/Dockerfile index c2d1f321..ba87e6a8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -36,8 +36,10 @@ COPY . . # Stage 2: The Final Image FROM ubuntu:24.04 +ARG TARGETARCH + # Set environment variables for NVIDIA capabilities -ENV NVIDIA_DRIVER_CAPABILITIES all +ENV NVIDIA_DRIVER_CAPABILITIES=all ENV DEBIAN_FRONTEND=noninteractive ENV LD_LIBRARY_PATH=/usr/lib/jellyfin-ffmpeg/lib @@ -53,7 +55,7 @@ RUN apt-get update && \ ca-certificates \ mesa-va-drivers && \ curl -s https://repo.jellyfin.org/ubuntu/jellyfin_team.gpg.key | gpg --dearmor | tee /usr/share/keyrings/jellyfin.gpg >/dev/null && \ - echo 'deb [arch=amd64 signed-by=/usr/share/keyrings/jellyfin.gpg] https://repo.jellyfin.org/ubuntu noble main' > /etc/apt/sources.list.d/jellyfin.list && \ + echo "deb [arch=${TARGETARCH} signed-by=/usr/share/keyrings/jellyfin.gpg] https://repo.jellyfin.org/ubuntu noble main" > /etc/apt/sources.list.d/jellyfin.list && \ curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && \ apt-get install -y --no-install-recommends \ jellyfin-ffmpeg7 \