-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dea9186
commit 1acb974
Showing
4 changed files
with
131 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Build base image | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: "Version number" | ||
required: true | ||
type: string | ||
env: | ||
PYTHON_VERSION: "3.11" | ||
|
||
jobs: | ||
build-base-image: | ||
name: Builds and pushes the Music Assistant base container to ghcr.io | ||
runs-on: ubuntu-latest | ||
permissions: | ||
packages: write | ||
steps: | ||
- uses: actions/checkout@v4.1.4 | ||
- name: Download Widevine CDM client files from private repository | ||
shell: bash | ||
env: | ||
TOKEN: ${{ secrets.PRIVILEGED_GITHUB_TOKEN }} | ||
run: | | ||
mkdir -p widevine_cdm && cd widevine_cdm | ||
curl -OJ -H "Authorization: token ${TOKEN}" https://raw.githubusercontent.com/music-assistant/appvars/main/widevine_cdm_client/private_key.pem | ||
curl -OJ -H "Authorization: token ${TOKEN}" https://raw.githubusercontent.com/music-assistant/appvars/main/widevine_cdm_client/client_id.bin | ||
- name: Log in to the GitHub container registry | ||
uses: docker/login-action@v3.3.0 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3.6.1 | ||
|
||
- name: Build and Push image | ||
uses: docker/build-push-action@v6.7.0 | ||
with: | ||
context: . | ||
platforms: linux/amd64,linux/arm64 | ||
file: Dockerfile.base | ||
tags: |- | ||
ghcr.io/${{ github.repository_owner }}/base:${{ inputs.version }}, | ||
ghcr.io/${{ github.repository_owner }}/base:latest | ||
push: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# syntax=docker/dockerfile:1 | ||
|
||
# BASE docker image for music assistant container | ||
|
||
FROM python:3.12-alpine3.20 | ||
|
||
ARG TARGETPLATFORM | ||
|
||
RUN set -x \ | ||
&& apk add --no-cache \ | ||
ca-certificates \ | ||
jemalloc \ | ||
curl \ | ||
git \ | ||
wget \ | ||
tzdata \ | ||
sox \ | ||
cifs-utils \ | ||
# install ffmpeg from community repo | ||
&& apk add --no-cache ffmpeg --repository=https://dl-cdn.alpinelinux.org/alpine/v3.20/community \ | ||
# install snapcast from community repo | ||
&& apk add --no-cache snapcast --repository=https://dl-cdn.alpinelinux.org/alpine/v3.20/community \ | ||
# install libnfs from community repo | ||
&& apk add --no-cache libnfs --repository=https://dl-cdn.alpinelinux.org/alpine/v3.20/community \ | ||
# install openssl-dev (needed for airplay) | ||
&& apk add --no-cache openssl-dev | ||
|
||
# Copy widevine client files to container | ||
RUN mkdir -p /usr/local/bin/widevine_cdm | ||
COPY widevine_cdm/* /usr/local/bin/widevine_cdm/ | ||
|
||
# Upgrade pip + Install uv | ||
RUN pip install --upgrade pip \ | ||
&& pip install uv==0.2.27 | ||
|
||
# Configure runtime environmental variables | ||
ENV LD_PRELOAD="/usr/lib/libjemalloc.so.2" | ||
ENV UV_SYSTEM_PYTHON="1" | ||
|
||
LABEL \ | ||
org.opencontainers.image.title="Music Assistant Base Image" \ | ||
org.opencontainers.image.description="Base Image for Music Assistant server - not to be used directly" \ | ||
org.opencontainers.image.source="https://github.com/music-assistant/server" \ | ||
org.opencontainers.image.authors="The Music Assistant Team" \ | ||
org.opencontainers.image.licenses="Apache License 2.0" |