Files
playlistd/Containerfile
T
Claude 77f9f29cc6 Build the web UI into the .deb
- Package discover/dist to /usr/share/playlistd/discover, and serve it
  from there in the default config. cargo deb refuses to package if the
  UI hasn't been built, rather than shipping without it.
- Install a pinned Node.js (22.23.4, checksum-verified) in the
  Containerfile; Ubuntu 22.04's is too old for Vite. The README's build
  command now builds the UI first.
- Recommend yt-dlp, for playing suggested songs from YouTube.
- If discover.ui points to a missing directory, warn instead of letting
  Rocket panic at startup.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018opPJMJjLWr4RqdG6vuK6p
2026-11-14 10:02:25 +00:00

21 lines
979 B
Docker

FROM ubuntu:22.04
ENV RUSTUP_HOME=/usr/local/rustup \
CARGO_HOME=/usr/local/cargo \
PATH=/usr/local/cargo/bin:$PATH
RUN apt update && DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt install -y gcc gcc-multilib cmake pkg-config libssl-dev curl dpkg-dev xz-utils
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --no-modify-path --profile minimal --default-toolchain nightly
RUN cargo install cargo-deb
# Node.js, to build the web UI (Ubuntu 22.04's is too old for Vite)
ARG NODE_VERSION=22.23.4
RUN arch="$(dpkg --print-architecture | sed 's/amd64/x64/')" \
&& file="node-v${NODE_VERSION}-linux-${arch}.tar.xz" \
&& cd /tmp \
&& curl -fsSLO "https://nodejs.org/dist/v${NODE_VERSION}/${file}" \
&& curl -fsSL "https://nodejs.org/dist/v${NODE_VERSION}/SHASUMS256.txt" | grep " ${file}\$" | sha256sum -c - \
&& tar -xJf "${file}" -C /usr/local --strip-components=1 --no-same-owner \
&& rm "${file}" \
&& node --version