FLAC encoder now tracks frame numbers and reuses per-channel sample buffers to reduce allocations. Client dialer always frees the active slot on release so mDNS re-emissions can reconnect cleanly. Server send buffer uses drop-oldest instead of hard failure, with lateness tracking. Added engine stats logging (chunks/sec, kbps) and writer diagnostics. UI simplified to a single play/pause toggle that auto-starts playback on preset selection. Added --preset CLI flag for headless startup. Removed stale systemd service files. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
65 lines
2.2 KiB
Docker
65 lines
2.2 KiB
Docker
FROM golang:1.24-bookworm
|
|
|
|
# Enable ARM multiarch and install cross-compilers + ARM versions of CGo deps
|
|
RUN dpkg --add-architecture armhf \
|
|
&& dpkg --add-architecture arm64 \
|
|
&& apt-get update \
|
|
&& apt-get install -y --no-install-recommends \
|
|
crossbuild-essential-armhf \
|
|
crossbuild-essential-arm64 \
|
|
pkg-config \
|
|
libasound2-dev:armhf \
|
|
libopus-dev:armhf \
|
|
libopusfile-dev:armhf \
|
|
libogg-dev:armhf \
|
|
libasound2-dev:arm64 \
|
|
libopus-dev:arm64 \
|
|
libopusfile-dev:arm64 \
|
|
libogg-dev:arm64 \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
WORKDIR /src
|
|
COPY go.mod go.sum ./
|
|
COPY third_party/sendspin-go/go.mod third_party/sendspin-go/go.sum ./third_party/sendspin-go/
|
|
RUN go mod download
|
|
|
|
COPY . .
|
|
|
|
RUN mkdir -p /out
|
|
|
|
# armhf (RPi 2/3/4 32-bit, RPi Zero 2 W 32-bit)
|
|
RUN CGO_ENABLED=1 \
|
|
CC=arm-linux-gnueabihf-gcc \
|
|
PKG_CONFIG_LIBDIR=/usr/lib/arm-linux-gnueabihf/pkgconfig \
|
|
GOOS=linux GOARCH=arm GOARM=7 \
|
|
go build -buildvcs=false -o /out/sendspin-client-armhf ./cmd/client/ \
|
|
&& CGO_ENABLED=1 \
|
|
CC=arm-linux-gnueabihf-gcc \
|
|
PKG_CONFIG_LIBDIR=/usr/lib/arm-linux-gnueabihf/pkgconfig \
|
|
GOOS=linux GOARCH=arm GOARM=7 \
|
|
go build -buildvcs=false -o /out/sendspin-server-armhf ./cmd/server/ \
|
|
&& CGO_ENABLED=1 \
|
|
CC=arm-linux-gnueabihf-gcc \
|
|
PKG_CONFIG_LIBDIR=/usr/lib/arm-linux-gnueabihf/pkgconfig \
|
|
GOOS=linux GOARCH=arm GOARM=7 \
|
|
go build -buildvcs=false -o /out/sendspin-live-server-armhf ./cmd/live-server/
|
|
|
|
# arm64 (RPi 3/4/5 64-bit)
|
|
RUN CGO_ENABLED=1 \
|
|
CC=aarch64-linux-gnu-gcc \
|
|
PKG_CONFIG_LIBDIR=/usr/lib/aarch64-linux-gnu/pkgconfig \
|
|
GOOS=linux GOARCH=arm64 \
|
|
go build -buildvcs=false -o /out/sendspin-client-arm64 ./cmd/client/ \
|
|
&& CGO_ENABLED=1 \
|
|
CC=aarch64-linux-gnu-gcc \
|
|
PKG_CONFIG_LIBDIR=/usr/lib/aarch64-linux-gnu/pkgconfig \
|
|
GOOS=linux GOARCH=arm64 \
|
|
go build -buildvcs=false -o /out/sendspin-server-arm64 ./cmd/server/ \
|
|
&& CGO_ENABLED=1 \
|
|
CC=aarch64-linux-gnu-gcc \
|
|
PKG_CONFIG_LIBDIR=/usr/lib/aarch64-linux-gnu/pkgconfig \
|
|
GOOS=linux GOARCH=arm64 \
|
|
go build -buildvcs=false -o /out/sendspin-live-server-arm64 ./cmd/live-server/
|
|
|
|
CMD ["sh", "-c", "cp /out/* /binaries/"]
|