initial commit
This commit is contained in:
commit
5040340924
9
README.md
Normal file
9
README.md
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
These are two of the services I've converted to Docker images that I run on my
|
||||||
|
home server. You can run them like so:
|
||||||
|
|
||||||
|
docker run -d -p 3689:3689 -v /media:/yourfiles -e MUSIC_DIR=music \
|
||||||
|
johnbintz/forked-daapd
|
||||||
|
docker run -d -p 8200:8200 -p 1900:1900 -v /media:/yourfiles \
|
||||||
|
-e MOVIES_DIR=movies -e PODCASTS_DIR=music johnbintz/minidlna
|
||||||
|
|
||||||
|
Have fun.
|
20
forked-daapd/Dockerfile
Normal file
20
forked-daapd/Dockerfile
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
FROM debian:jessie
|
||||||
|
|
||||||
|
ENV DEBIAN_FRONTEND noninteractive
|
||||||
|
ENV DEBIAN_PRIORITY critical
|
||||||
|
ENV DEBCONF_NOWARNINGS yes
|
||||||
|
|
||||||
|
RUN echo 'Acquire::http { Proxy "http://172.17.42.1:3128"; };' >> /etc/apt/apt.conf.d/01proxy
|
||||||
|
RUN echo 'Acquire::http::User-Agent "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/6.0)";' >> /etc/apt/apt.conf.d/01proxy
|
||||||
|
|
||||||
|
RUN apt-get -y update && apt-get install -y ruby forked-daapd && \
|
||||||
|
rm -Rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
VOLUME /media
|
||||||
|
ADD forked-daapd.conf.erb /etc/forked-daapd.conf.erb
|
||||||
|
ADD start /usr/sbin/start
|
||||||
|
|
||||||
|
EXPOSE 3689
|
||||||
|
|
||||||
|
CMD ["bash", "/usr/sbin/start"]
|
||||||
|
|
52
forked-daapd/forked-daapd.conf.erb
Normal file
52
forked-daapd/forked-daapd.conf.erb
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
general {
|
||||||
|
# Username
|
||||||
|
uid = "root"
|
||||||
|
logfile = "/var/log/forked-daapd.log"
|
||||||
|
# Database location
|
||||||
|
db_path = "/var/cache/forked-daapd/songs3.db"
|
||||||
|
# Available levels: fatal, log, warning, info, debug, spam
|
||||||
|
loglevel = warning
|
||||||
|
# Admin password for the non-existent web interface
|
||||||
|
admin_password = "unused"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Library configuration
|
||||||
|
library {
|
||||||
|
# Name of the library as displayed by the clients
|
||||||
|
# %h: hostname, %v: version
|
||||||
|
name = "<%= ENV['DAAPD_NAME'] || 'My Music on %h' %>"
|
||||||
|
# TCP port to listen on. Default port is 3689 (daap)
|
||||||
|
port = 3689
|
||||||
|
# Password for the library. Optional.
|
||||||
|
# password = ""
|
||||||
|
|
||||||
|
# Directories to index
|
||||||
|
directories = { "/media/<%= ENV['MUSIC_DIR'] || 'Podcasts' %>" }
|
||||||
|
# Directories containing compilations
|
||||||
|
# Matches anywhere in the path (not a regexp, though)
|
||||||
|
# #compilations = { "/compilations/" }
|
||||||
|
|
||||||
|
# Should iTunes metadata override ours?
|
||||||
|
itunes_overrides = true
|
||||||
|
|
||||||
|
# Formats: mp4a, mp4v, mpeg, alac, flac, mpc, ogg, wma, wmal, wmav, aif, wav
|
||||||
|
# Formats that should never be transcoded
|
||||||
|
# no_transcode = { "alac", "mp4a" }
|
||||||
|
# Formats that should always be transcoded
|
||||||
|
# force_transcode = { "ogg", "flac" }
|
||||||
|
}
|
||||||
|
|
||||||
|
# Local audio output
|
||||||
|
#audio {
|
||||||
|
# # AirTunes name - used in the speaker list in Remote
|
||||||
|
#nickname = "Computer"
|
||||||
|
# Audio device name for local audio output
|
||||||
|
# card = "default"
|
||||||
|
#}
|
||||||
|
|
||||||
|
# Airport Express device
|
||||||
|
#apex "ApEx" {
|
||||||
|
# AirTunes password
|
||||||
|
# password = "s1kr3t"
|
||||||
|
#}
|
||||||
|
|
9
forked-daapd/start
Normal file
9
forked-daapd/start
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
ruby -rerb -e 'ERB.new($stdin.read).run(binding)' < /etc/forked-daapd.conf.erb > /etc/forked-daapd.conf
|
||||||
|
/etc/init.d/dbus start
|
||||||
|
/etc/init.d/avahi-daemon start
|
||||||
|
/usr/sbin/forked-daapd -f -c /etc/forked-daapd.conf
|
||||||
|
/etc/init.d/avai-daemon stop
|
||||||
|
/etc/init.d/dbus stop
|
||||||
|
|
32
minidlna/Dockerfile
Normal file
32
minidlna/Dockerfile
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
FROM debian:jessie
|
||||||
|
|
||||||
|
ENV DEBIAN_FRONTEND noninteractive
|
||||||
|
ENV DEBIAN_PRIORITY critical
|
||||||
|
ENV DEBCONF_NOWARNINGS yes
|
||||||
|
|
||||||
|
RUN echo 'Acquire::http { Proxy "http://172.17.42.1:3128"; };' >> /etc/apt/apt.conf.d/01proxy
|
||||||
|
RUN echo 'Acquire::http::User-Agent "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/6.0)";' >> /etc/apt/apt.conf.d/01proxy
|
||||||
|
RUN echo 'deb-src http://ftp.us.debian.org/debian/ jessie main contrib non-free' >> /etc/apt/sources.list
|
||||||
|
|
||||||
|
RUN apt-get -y update && apt-get install -y curl ruby && \
|
||||||
|
apt-get -y build-dep minidlna && \
|
||||||
|
cd /tmp && \
|
||||||
|
bash -c "curl -x http://172.17.42.1:3128 -L 'http://downloads.sourceforge.net/project/minidlna/minidlna/1.1.4/minidlna-1.1.4.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fminidlna%2F&ts=1416445930&use_mirror=softlayer-dal' | tar zxvf -" && \
|
||||||
|
cd minidlna-1.1.4 && \
|
||||||
|
./configure && \
|
||||||
|
make -j3 && \
|
||||||
|
make install && \
|
||||||
|
cd .. && \
|
||||||
|
rm -Rf minidlna-1.1.4 && \
|
||||||
|
dpkg -l | grep -- "-dev" | awk '{print $2}' | xargs apt-get -y remove && \
|
||||||
|
rm -Rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
VOLUME /media
|
||||||
|
ADD minidlna.conf.erb /etc/minidlna.conf.erb
|
||||||
|
ADD start /usr/sbin/start
|
||||||
|
|
||||||
|
EXPOSE 1900/udp
|
||||||
|
EXPOSE 8200
|
||||||
|
|
||||||
|
CMD ["bash", "/usr/sbin/start"]
|
||||||
|
|
96
minidlna/minidlna.conf.erb
Normal file
96
minidlna/minidlna.conf.erb
Normal file
@ -0,0 +1,96 @@
|
|||||||
|
# This is the configuration file for the MiniDLNA daemon, a DLNA/UPnP-AV media
|
||||||
|
# server.
|
||||||
|
#
|
||||||
|
# Unless otherwise noted, the commented out options show their default value.
|
||||||
|
#
|
||||||
|
# On Debian, you can also refer to the minidlna.conf(5) man page for
|
||||||
|
# documentation about this file.
|
||||||
|
|
||||||
|
|
||||||
|
# Path to the directory you want scanned for media files.
|
||||||
|
#
|
||||||
|
# This option can be specified more than once if you want multiple directories
|
||||||
|
# scanned.
|
||||||
|
#
|
||||||
|
# If you want to restrict a media_dir to a specific content type, you can
|
||||||
|
# prepend the directory name with a letter representing the type (A, P or V),
|
||||||
|
# followed by a comma, as so:
|
||||||
|
# * "A" for audio (eg. media_dir=A,/var/lib/minidlna/music)
|
||||||
|
# * "P" for pictures (eg. media_dir=P,/var/lib/minidlna/pictures)
|
||||||
|
# * "V" for video (eg. media_dir=V,/var/lib/minidlna/videos)
|
||||||
|
#
|
||||||
|
# WARNING: After changing this option, you need to rebuild the database. Either
|
||||||
|
# run minidlna with the '-R' option, or delete the 'files.db' file
|
||||||
|
# from the db_dir directory (see below).
|
||||||
|
# On Debian, you can run, as root, 'service minidlna force-reload' instead.
|
||||||
|
media_dir=V,/media/<%= ENV['MOVIES_DIR'] || 'Movies' %>
|
||||||
|
media_dir=A,/media/<%= ENV['PODCASTS_DIR'] || 'Podcasts' %>
|
||||||
|
|
||||||
|
# Path to the directory that should hold the database and album art cache.
|
||||||
|
#db_dir=/var/lib/minidlna
|
||||||
|
|
||||||
|
# Path to the directory that should hold the log file.
|
||||||
|
#log_dir=/var/log
|
||||||
|
|
||||||
|
# Minimum level of importance of messages to be logged.
|
||||||
|
# Must be one of "off", "fatal", "error", "warn", "info" or "debug".
|
||||||
|
# "off" turns of logging entirely, "fatal" is the highest level of importance
|
||||||
|
# and "debug" the lowest.
|
||||||
|
#log_level=warn
|
||||||
|
|
||||||
|
# Use a different container as the root of the directory tree presented to
|
||||||
|
# clients. The possible values are:
|
||||||
|
# * "." - standard container
|
||||||
|
# * "B" - "Browse Directory"
|
||||||
|
# * "M" - "Music"
|
||||||
|
# * "P" - "Pictures"
|
||||||
|
# * "V" - "Video"
|
||||||
|
# if you specify "B" and client device is audio-only then "Music/Folders" will be used as root
|
||||||
|
#root_container=.
|
||||||
|
|
||||||
|
# Network interface(s) to bind to (e.g. eth0), comma delimited.
|
||||||
|
#network_interface=
|
||||||
|
|
||||||
|
# IPv4 address to listen on (e.g. 192.0.2.1).
|
||||||
|
#listening_ip=
|
||||||
|
|
||||||
|
# Port number for HTTP traffic (descriptions, SOAP, media transfer).
|
||||||
|
port=8200
|
||||||
|
|
||||||
|
# URL presented to clients.
|
||||||
|
# The default is the IP address of the server on port 80.
|
||||||
|
#presentation_url=http://example.com:80
|
||||||
|
|
||||||
|
# Name that the DLNA server presents to clients.
|
||||||
|
friendly_name=<%= ENV['MINIDLNA_NAME'] || 'minidlna' %>
|
||||||
|
|
||||||
|
# Serial number the server reports to clients.
|
||||||
|
serial=<%= Time.now.to_i %>
|
||||||
|
|
||||||
|
# Model name the server reports to clients.
|
||||||
|
#model_name=Windows Media Connect compatible (MiniDLNA)
|
||||||
|
|
||||||
|
# Model number the server reports to clients.
|
||||||
|
model_number=1
|
||||||
|
|
||||||
|
# Automatic discovery of new files in the media_dir directory.
|
||||||
|
inotify=yes
|
||||||
|
|
||||||
|
# List of file names to look for when searching for album art. Names should be
|
||||||
|
# delimited with a forward slash ("/").
|
||||||
|
album_art_names=Cover.jpg/cover.jpg/AlbumArtSmall.jpg/albumartsmall.jpg/AlbumArt.jpg/albumart.jpg/Album.jpg/album.jpg/Folder.jpg/folder.jpg/Thumb.jpg/thumb.jpg
|
||||||
|
|
||||||
|
# Strictly adhere to DLNA standards.
|
||||||
|
# This allows server-side downscaling of very large JPEG images, which may
|
||||||
|
# decrease JPEG serving performance on (at least) Sony DLNA products.
|
||||||
|
#strict_dlna=no
|
||||||
|
|
||||||
|
# Support for streaming .jpg and .mp3 files to a TiVo supporting HMO.
|
||||||
|
#enable_tivo=no
|
||||||
|
|
||||||
|
# Notify interval, in seconds.
|
||||||
|
#notify_interval=895
|
||||||
|
|
||||||
|
# Path to the MiniSSDPd socket, for MiniSSDPd support.
|
||||||
|
#minissdpdsocket=/run/minissdpd.sock
|
||||||
|
|
5
minidlna/start
Normal file
5
minidlna/start
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
ruby -rerb -e 'ERB.new($stdin.read).run(binding)' < /etc/minidlna.conf.erb > /etc/minidlna.conf
|
||||||
|
/usr/local/sbin/minidlnad -d -f /etc/minidlna.conf
|
||||||
|
|
Loading…
Reference in New Issue
Block a user