From 9b8fefca0d4dfce0fdb957eea8e428a1d8436461 Mon Sep 17 00:00:00 2001 From: Thomas Dalton Date: Thu, 27 Aug 2026 19:10:16 +0100 Subject: [PATCH] feat: initial commit --- Dockerfile | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..389e90b --- /dev/null +++ b/Dockerfile @@ -0,0 +1,32 @@ +FROM alpine:latest AS builder +LABEL maintainer="Thomas Dalton " +LABEL org.opencontainers.image.source="https://git.tabbytv.com/tom/docker-mpd" + +ARG version="v0.23.16" + +RUN set -xe \ + && apk add --no-cache alpine-sdk cmake alsa-lib-dev avahi-dev boost-dev curl-dev expat-dev faad2-dev ffmpeg-dev flac-dev fmt-dev glib-dev gtest-dev icu-dev jack-dev lame-dev libao-dev libcap-utils libcdio-paranoia-dev libid3tag-dev libmad-dev libmodplug-dev libmpdclient-dev libogg-dev libsamplerate-dev libshout-dev libvorbis-dev meson opus-dev pipewire-dev pulseaudio-dev py3-attrs py3-sphinx soxr-dev wavpack-dev + +ADD https://github.com/njh/twolame/releases/download/0.4.0/twolame-0.4.0.tar.gz /tmp/twolame.tar.gz +RUN tar -xzf /tmp/twolame.tar.gz -C /tmp +WORKDIR /tmp/twolame-0.4.0 +RUN ./configure --prefix=/tmp/build/twolame +RUN make -j${nproc} +RUN make install + +ADD https://github.com/MusicPlayerDaemon/MPD.git#${version} /tmp/mpd +WORKDIR /tmp/mpd +RUN meson setup . output --buildtype=release -Db_lto=true -Dtwolame=enabled -Dsysconfdir='/usr/local/etc' +RUN meson compile -C output +RUN meson install -C output --destdir /tmp/build/mpd + +FROM alpine:latest +COPY --from=builder /tmp/build/mpd /usr/local +COPY --from=builder /tmp/mpd/doc/mpdconf.example /usr/local/etc/mpd.conf +COPY --from=builder /tmp/build/twolame /usr/local +RUN apk add --no-cache avahi-libs boost faad2-libs ffmpeg-libavformat ffmpeg-libavfilter fmt libao libcdio libcdio-paranoia libcurl libid3tag libmad libmodplug libmpdclient libpulse libsamplerate libshout pipewire-jack pipewire-libs wavpack-libs + +VOLUME ["/var/lib/mpd"] + +EXPOSE 6600 +CMD ["mpd", "--stdout", "--no-daemon"]