A modern, network-enabled music player platform built on Rockbox technology. rockboxd.tsiry-sandratraina.com
rust deno navidrome airplay libadwaita zig mpris snapcast mpd rockbox audio subsonic
2

Configure Feed

Select the types of activity you want to include in your feed.

rockboxd / Dockerfile
4.4 kB 125 lines
1# ── WebUI ────────────────────────────────────────────────────────────────────── 2FROM node:24 AS webui-builder 3 4RUN apt-get update && apt-get install -y curl unzip && rm -rf /var/lib/apt/lists/* 5 6RUN curl -fsSL https://deno.land/install.sh | sh 7ENV DENO_INSTALL="/root/.deno" 8ENV PATH="${DENO_INSTALL}/bin:${PATH}" 9 10WORKDIR /app/webui/rockbox 11COPY webui/rockbox/package.json ./ 12RUN deno install --allow-scripts 13COPY webui/rockbox/ ./ 14RUN deno task build 15 16# ── S3 admin UI ──────────────────────────────────────────────────────────────── 17# Built inside the image so `docker build .` is self-contained — the repo's 18# .dockerignore excludes every `dist/` directory, so the host's pre-built bundle 19# never reaches the build context. 20FROM oven/bun:1 AS s3-admin-builder 21 22WORKDIR /app/crates/s3/s3webui 23COPY crates/s3/s3webui/package.json crates/s3/s3webui/bun.lock ./ 24RUN bun install --frozen-lockfile 25COPY crates/s3/s3webui/ ./ 26RUN bun run build 27 28# ── Rockbox daemon ───────────────────────────────────────────────────────────── 29FROM rust:1.95-trixie AS builder 30 31ARG TARGETARCH 32ARG TAG 33 34ENV TAG=${TAG} 35 36# Runtime deps for cpal (ALSA) and other libs 37RUN apt-get update && apt-get install -y \ 38 build-essential \ 39 libunwind-dev \ 40 libasound2-dev \ 41 libdbus-1-dev \ 42 protobuf-compiler \ 43 curl \ 44 wget \ 45 zip \ 46 unzip \ 47 cmake 48 49# Install Zig 0.16.0 50RUN case "${TARGETARCH}" in \ 51 amd64) ZIG_ARCH="x86_64" ;; \ 52 arm64) ZIG_ARCH="aarch64" ;; \ 53 *) echo "Unsupported arch: ${TARGETARCH}" && exit 1 ;; \ 54 esac && \ 55 export VERSION=0.16.0 && \ 56 wget "https://ziglang.org/download/${VERSION}/zig-${ZIG_ARCH}-linux-${VERSION}.tar.xz" && \ 57 tar -xf "zig-${ZIG_ARCH}-linux-${VERSION}.tar.xz" && \ 58 mv "zig-${ZIG_ARCH}-linux-${VERSION}" /usr/local/zig && \ 59 ln -s /usr/local/zig/zig /usr/local/bin/zig 60 61COPY . /app 62WORKDIR /app 63COPY --from=webui-builder /app/webui/rockbox/dist/ /app/webui/rockbox/dist/ 64COPY --from=s3-admin-builder /app/crates/s3/s3webui/dist/ /app/crates/s3/s3webui/dist/ 65 66# Build rockboxd via the headless script (configure + make + cargo + zig) 67RUN bash scripts/build-headless.sh 68 69# Build the rockbox CLI binary 70RUN cargo build -p rockbox --release 71 72# ── Runtime image ────────────────────────────────────────────────────────────── 73FROM typesense/typesense:30.1 AS typesense 74 75FROM debian:trixie-slim 76 77ARG TARGETARCH 78ARG SNAP_VERSION=0.35.0 79 80RUN apt-get update && apt-get install -y \ 81 libunwind8 \ 82 libasound2 \ 83 libdbus-1-3 \ 84 wget \ 85 && case "${TARGETARCH}" in \ 86 amd64) SNAP_ARCH="amd64" ;; \ 87 arm64) SNAP_ARCH="arm64" ;; \ 88 *) echo "Unsupported arch: ${TARGETARCH}" && exit 1 ;; \ 89 esac \ 90 && wget -q "https://github.com/snapcast/snapcast/releases/download/v${SNAP_VERSION}/snapserver_${SNAP_VERSION}-1_${SNAP_ARCH}_trixie.deb" -O /tmp/snapserver.deb \ 91 && apt-get install -y /tmp/snapserver.deb \ 92 && rm /tmp/snapserver.deb \ 93 && apt-get remove -y wget \ 94 && rm -rf /var/lib/apt/lists/* 95 96COPY --from=builder /app/zig/zig-out/bin/rockboxd /usr/local/bin/rockboxd 97COPY --from=builder /app/target/release/rockbox /usr/local/bin/rockbox 98COPY --from=typesense /opt/typesense-server /usr/local/bin/typesense-server 99 100COPY docker/snapserver.conf /etc/snapserver.conf 101COPY docker/entrypoint.sh /usr/local/bin/entrypoint.sh 102RUN chmod +x /usr/local/bin/entrypoint.sh 103 104RUN mkdir -p /root/.config/rockbox.org 105COPY docker/settings.toml /root/.config/rockbox.org/settings.toml 106 107RUN mkdir -p /root/Music 108 109# rockboxd ports 110EXPOSE 6061 111EXPOSE 6062 112EXPOSE 6063 113EXPOSE 6600 114# CMAF (HLS + DASH) — default audio output, played directly in the browser 115EXPOSE 7882 116# snapserver: client protocol, HTTP stream, HTTP JSON API 117EXPOSE 1704 118EXPOSE 1705 119EXPOSE 1780 120# navidrome 121EXPOSE 4533 122# jellyfin 123EXPOSE 8096 124 125ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]