mirror of
https://github.com/cstaelen/tidarr.git
synced 2026-10-19 01:30:57 -05:00
* Add multi-platform docker image support (#420) * bump 0.4.4 * add buildx command --------- Co-authored-by: Morteza PRK <mortezaPRK@users.noreply.github.com>
This commit is contained in:
1 parent
f252084a17
commit
5052751696
7 files changed
+53
-17
No files matched your search
@@ -2,16 +2,24 @@ name: Publish Docker image
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
types: [published, edited]
|
||||
|
||||
jobs:
|
||||
push_to_registry:
|
||||
name: Push Docker image to Docker Hub
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
DOCKER_PLATFORMS: linux/amd64,linux/arm64
|
||||
steps:
|
||||
- name: Check out the repo
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Log in to Docker Hub
|
||||
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
|
||||
with:
|
||||
@@ -25,22 +33,24 @@ jobs:
|
||||
images: cstaelen/tidarr
|
||||
|
||||
- name: Build and push pre-release docker image
|
||||
if: "github.event.pre-release"
|
||||
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
|
||||
if: ${{ github.event.release.prerelease }}
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
context: .
|
||||
file: ./docker/Dockerfile.prod
|
||||
platforms: ${{ env.DOCKER_PLATFORMS }}
|
||||
push: true
|
||||
build-args: VERSION=${{ github.ref_name }}
|
||||
tags: cstaelen/tidarr:prerelease
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
|
||||
- name: Build and push release docker image
|
||||
if: "!github.event.pre-release"
|
||||
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
|
||||
if: ${{ !github.event.release.prerelease }}
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
context: .
|
||||
file: ./docker/Dockerfile.prod
|
||||
platforms: ${{ env.DOCKER_PLATFORMS }}
|
||||
push: true
|
||||
build-args: VERSION=${{ github.ref_name }}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
|
||||
@@ -3,6 +3,10 @@ Tidarr notable changes.
|
||||
|
||||
[Keep a Changelog](http://keepachangelog.com/en/1.0.0/) format.
|
||||
|
||||
## 📦 0.4.4
|
||||
### 🖍 Changed
|
||||
* [Docker] use buildx from multi-platform image by @mortezaPRK #420
|
||||
|
||||
## 📦 0.4.3
|
||||
### 🖍 Changed
|
||||
* [API] Sync cron uses TZ env var if exists or fallback to system timezone
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
IMAGE=cstaelen/tidarr
|
||||
VERSION=testing
|
||||
IMAGE_TAG?=testing
|
||||
BUILD_VERSION?=0.0.0-prod
|
||||
PLATFORMS?=linux/amd64,linux/arm64
|
||||
DOCKERFILE=./docker/Dockerfile.prod
|
||||
DOCKER_COMPOSE = $(or docker compose, docker-compose)
|
||||
|
||||
@@ -63,14 +65,13 @@ quality-lint-fix: ## Check dependencies
|
||||
## Builder 🚀
|
||||
##-----------
|
||||
|
||||
docker-build: ## Build Tidarr docker image
|
||||
docker build --platform=linux/amd64 --build-arg VERSION=0.0.0-prod -f ${DOCKERFILE} -t ${IMAGE}:${VERSION} .
|
||||
docker-build:
|
||||
docker buildx build --platform ${PLATFORMS} --build-arg VERSION=${BUILD_VERSION} -f ${DOCKERFILE} -t ${IMAGE}:${IMAGE_TAG} .
|
||||
|
||||
docker-run: ## Run tidarr docker image
|
||||
docker run \
|
||||
--rm \
|
||||
--name tidarr \
|
||||
--platform=linux/amd64 \
|
||||
-p 8484:8484 \
|
||||
-v ${PWD}/docker/mnt/config:/home/app/standalone/shared \
|
||||
-v ${PWD}/docker/mnt/library:/home/app/standalone/library \
|
||||
@@ -79,7 +80,7 @@ docker-run: ## Run tidarr docker image
|
||||
-e PUID=501 \
|
||||
-e PGID=501 \
|
||||
-e ADMIN_PASSWORD=tidarr \
|
||||
${IMAGE}:${VERSION}
|
||||
${IMAGE}:${IMAGE_TAG}
|
||||
|
||||
##
|
||||
## Help ℹ️
|
||||
|
||||
@@ -57,6 +57,7 @@ Tidarr is a Docker image that provides a web interface to download up to **24-bi
|
||||
- Watch and sync playlists, mixes, favorites and artists with cron
|
||||
- Skip download if track exists
|
||||
- Custom CSS
|
||||
- Docker platforms:`linux/amd64` and `linux/arm64`
|
||||
|
||||
### Service integration
|
||||
|
||||
@@ -75,7 +76,7 @@ Tidarr is a Docker image that provides a web interface to download up to **24-bi
|
||||
- Server-side download list processing
|
||||
- UI built with **ReactJS** + **ExpressJS** API
|
||||
- Self-hostable with **Docker** using a Linuxserver.io base image (uncompressed size: ~190 MB)
|
||||
- Download Tidal content with [Tiddl (2.6.4)](https://github.com/oskvr37/tiddl/tree/v2.6.4)
|
||||
- Download Tidal content with [Tiddl (2.7.0)](https://github.com/oskvr37/tiddl/tree/v2.7.0)
|
||||
|
||||
|
||||
## Getting Started
|
||||
@@ -358,6 +359,22 @@ Check docker environment variables in `compose.yml` before running :
|
||||
make dev
|
||||
```
|
||||
|
||||
### Multi-platform Docker builds
|
||||
|
||||
The `docker-build` Makefile target now relies on [Docker Buildx](https://docs.docker.com/build/buildx/) so you can produce images for several architectures in one command.
|
||||
|
||||
- Build a multi-platform image (default: `linux/amd64` and `linux/arm64`):
|
||||
|
||||
```bash
|
||||
make docker-build IMAGE_TAG=latest BUILD_VERSION=1.2.3
|
||||
```
|
||||
|
||||
- Build a custom platform image or local image for your host (example `linux/arm64`):
|
||||
|
||||
```bash
|
||||
make docker-build PLATFORMS=linux/arm64 IMAGE_TAG=dev BUILD_VERSION=0.0.0-dev
|
||||
```
|
||||
|
||||
Run tests :
|
||||
|
||||
```bash
|
||||
|
||||
@@ -4,7 +4,6 @@ services:
|
||||
context: .
|
||||
dockerfile: './docker/Dockerfile.dev'
|
||||
container_name: 'tidarr'
|
||||
platform: linux/amd64
|
||||
ports:
|
||||
- 8484:8484
|
||||
- 3000:3000
|
||||
@@ -40,7 +39,6 @@ services:
|
||||
context: .
|
||||
dockerfile: './docker/Dockerfile.e2e'
|
||||
container_name: 'tidarr-testing'
|
||||
platform: linux/amd64
|
||||
volumes:
|
||||
- ./e2e:/home/app/standalone/e2e
|
||||
- ./docker/mnt/config:/home/app/standalone/shared
|
||||
|
||||
@@ -2,12 +2,15 @@
|
||||
|
||||
## BUILD APP
|
||||
|
||||
FROM alpine:3.21 AS app_builder
|
||||
ARG BUILDPLATFORM
|
||||
ARG TARGETPLATFORM
|
||||
|
||||
FROM --platform=$BUILDPLATFORM alpine:3.21 AS app_builder
|
||||
INCLUDE docker/stages/Dockerfile.builder
|
||||
|
||||
## BUILD STANDALONE APP
|
||||
|
||||
FROM mcr.microsoft.com/playwright:v1.56.1-noble AS runner
|
||||
FROM --platform=$TARGETPLATFORM mcr.microsoft.com/playwright:v1.56.1-noble AS runner
|
||||
|
||||
RUN apt-get upgrade && apt-get clean && apt-get update
|
||||
RUN apt-get install -y python3.12-venv python3-pip beets
|
||||
|
||||
@@ -2,13 +2,16 @@
|
||||
|
||||
## BUILD APP
|
||||
|
||||
FROM ghcr.io/linuxserver/baseimage-alpine:3.21 AS app_builder
|
||||
ARG BUILDPLATFORM
|
||||
ARG TARGETPLATFORM
|
||||
|
||||
FROM --platform=$BUILDPLATFORM ghcr.io/linuxserver/baseimage-alpine:3.21 AS app_builder
|
||||
|
||||
INCLUDE docker/stages/Dockerfile.builder
|
||||
|
||||
## BUILD STANDALONE APP
|
||||
|
||||
FROM ghcr.io/linuxserver/baseimage-alpine:3.21 AS runner
|
||||
FROM --platform=$TARGETPLATFORM ghcr.io/linuxserver/baseimage-alpine:3.21 AS runner
|
||||
RUN apk add npm nodejs py3-pip
|
||||
|
||||
INCLUDE docker/stages/Dockerfile.python
|
||||
|
||||
Reference in new issue
Block a user