clone

a desktop tv and program guide for over-the-air broadcasts: what's on air, what your tuner gets, live tv, recordings

main
airwaves / deploy / standalone / Dockerfile
Dockerfile 1.6K
1# airwavesd built from this repository, for running Airwaves on any Docker2# host, amd64 or arm64 (docs/self-hosting.md). Build it from the repository3# root, as compose.yml here does:4# docker build -f deploy/standalone/Dockerfile -t airwavesd .5# Go cross-compiles on the builder's own platform, so a multi-platform6# build (docker buildx build --platform linux/amd64,linux/arm64 ...) only7# emulates the package installs.8FROM --platform=$BUILDPLATFORM golang:1.27-alpine AS build9ARG TARGETOS TARGETARCH10WORKDIR /src11COPY go.mod go.sum ./12COPY cmd ./cmd13COPY internal ./internal14COPY frontend/embed.go ./frontend/15COPY frontend/dist ./frontend/dist16RUN --mount=type=cache,target=/go/pkg/mod --mount=type=cache,target=/root/.cache/go-build \17 CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH \18 go build -trimpath -ldflags="-s -w" -o /out/airwavesd ./cmd/airwavesd1920# The runtime is deploy/Dockerfile's. Chromium renders the Airwaves Weather21# display to video for the weather channel's HDHomeRun stream. python3 runs22# yt-dlp for YouTube channels (airwavesd keeps the latest release in23# /data/tools), and deno solves YouTube's JavaScript challenges for it.24FROM alpine:325RUN apk add --no-cache ffmpeg ca-certificates tzdata chromium font-dejavu python3 deno26COPY --from=build /out/airwavesd /usr/local/bin/airwavesd27ENV AIRWAVES_DATA=/data HOME=/tmp28EXPOSE 8089 500429# Not root; compose.yml picks the user and group (PUID and PGID) that own30# the data and channels folders.31USER 1000:100032HEALTHCHECK --interval=30s --timeout=5s --start-period=30s CMD ["/usr/local/bin/airwavesd", "-healthcheck"]33ENTRYPOINT ["/usr/local/bin/airwavesd"]