## Summary - Switch navidrome deployment from upstream `deluan/navidrome:0.60.3` back to custom image `registry.ops.eblu.me/blumeops/navidrome:v1.0.2` - The v1.0.1 image was tagged before the `USER 65534` removal commit, so it still ran as a non-root user that couldn't write to the SQLite data directory - v1.0.2 is built from current main which includes both the `zlib-dev` build fix and the non-root user removal ## Deployment and Testing - [ ] Wait for CI to build `navidrome:v1.0.2` image - [ ] Sync via ArgoCD and verify pod starts without CrashLoopBackOff - [ ] Verify navidrome UI accessible at https://navidrome.ops.eblu.me Reviewed-on: https://forge.ops.eblu.me/eblume/blumeops/pulls/194
54 lines
1.4 KiB
Docker
54 lines
1.4 KiB
Docker
# Navidrome music server
|
|
# Three-stage build: UI (Node), backend (Go+taglib), runtime (Alpine)
|
|
|
|
ARG NAVIDROME_VERSION=v0.60.3
|
|
|
|
FROM node:22-alpine AS ui-build
|
|
|
|
ARG NAVIDROME_VERSION
|
|
RUN apk add --no-cache git
|
|
|
|
RUN git clone --depth 1 --branch ${NAVIDROME_VERSION} \
|
|
https://forge.ops.eblu.me/eblume/navidrome.git /app
|
|
|
|
WORKDIR /app/ui
|
|
RUN npm ci
|
|
RUN npm run build
|
|
|
|
FROM golang:alpine3.22 AS build
|
|
|
|
ARG NAVIDROME_VERSION
|
|
RUN apk add --no-cache build-base git taglib-dev zlib-dev
|
|
|
|
RUN git clone --depth 1 --branch ${NAVIDROME_VERSION} \
|
|
https://forge.ops.eblu.me/eblume/navidrome.git /app
|
|
|
|
WORKDIR /app
|
|
|
|
# Copy pre-built UI assets
|
|
COPY --from=ui-build /app/ui/build /app/ui/build
|
|
|
|
ENV CGO_ENABLED=1
|
|
ENV CGO_CFLAGS_ALLOW="--define-prefix"
|
|
|
|
RUN go build -tags=netgo \
|
|
-ldflags="-w -s -X github.com/navidrome/navidrome/consts.gitTag=${NAVIDROME_VERSION}" \
|
|
-o /navidrome .
|
|
|
|
FROM alpine:3.22
|
|
|
|
LABEL org.opencontainers.image.title=Navidrome
|
|
LABEL org.opencontainers.image.description="Navidrome is a self-hosted music server and streamer"
|
|
# Points to upstream canonical source, not the forge mirror used for builds
|
|
LABEL org.opencontainers.image.source=https://github.com/navidrome/navidrome
|
|
|
|
RUN apk add --no-cache ca-certificates tzdata taglib ffmpeg \
|
|
&& addgroup -g 1000 navidrome \
|
|
&& adduser -u 1000 -G navidrome -D navidrome
|
|
|
|
COPY --from=build /navidrome /usr/bin/navidrome
|
|
|
|
EXPOSE 4533
|
|
|
|
USER 1000
|
|
CMD ["/usr/bin/navidrome"]
|