Created
February 9, 2022 11:32
-
-
Save amitkeret/9dbd407a00e40a8fe09acd1b5cf9055e to your computer and use it in GitHub Desktop.
OwnTone Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# OwnTone Dockerfile | |
# Use this to create an OwnTone docker image | |
# The Dockerfile will create an initial configuration (.conf) file and a fifo pipe | |
# | |
# Run the image with: | |
# docker run -it --privileged \ | |
# --name=owntone --restart=unless-stopped \ | |
# -p 3689:3689 -p 6600:6600 \ | |
# -v /path/to/config/folder:/config -v /path/to/music:/music \ | |
# -v /var/run/avahi-daemon/socket:/var/run/avahi-daemon/socket \ | |
# [image-name] | |
FROM balenalib/rpi-raspbian | |
RUN apt-get update && apt-get install \ | |
build-essential git autotools-dev autoconf automake libtool gettext gawk \ | |
gperf bison flex libconfuse-dev libunistring-dev libsqlite3-dev \ | |
libavcodec-dev libavformat-dev libavfilter-dev libswscale-dev libavutil-dev \ | |
libasound2-dev libmxml-dev libgcrypt20-dev libavahi-client-dev zlib1g-dev \ | |
libevent-dev libplist-dev libsodium-dev libjson-c-dev libwebsockets-dev \ | |
libcurl4-openssl-dev libprotobuf-c-dev libgnutls*-dev | |
RUN git clone https://github.com/owntone/owntone-server.git && \ | |
cd owntone-server && \ | |
autoreconf -i && \ | |
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --enable-install-user --enable-chromecast --disable-spotify && \ | |
make && make install && \ | |
cd .. && rm -rf owntone-server && \ | |
apt clean && \ | |
rm -rf /var/lib/apt/lists/* && \ | |
cd / | |
VOLUME /music | |
RUN mkfifo /music/pipefifo | |
VOLUME /config | |
RUN cp /etc/owntone.conf /config/owntone.conf && cd /config %% \ | |
sed -i 's/directories = { "\/srv\/music" }/directories = { "\/music" }/' owntone.conf && \ | |
sed -i 's/#[[:blank:]]*pipe_autostart = true/pipe_autostart = true/' owntone.conf | |
ENTRYPOINT /usr/bin/owntone -c /config/owntone.conf -f |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment