-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
96 lines (74 loc) · 2.16 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
FROM sdhibit/rpi-baseimage:latest
MAINTAINER Sam Lake <[email protected]>
# Nicked this this from sdhibit/logitechmediaserver - just trying to build for the Pi
# Let the container know that there is no tty
ENV DEBIAN_FRONTEND noninteractive
# Fix a Debianism of the nobody's uid being 65534
RUN usermod -u 99 nobody
RUN usermod -g 100 nobody
#Set Logitech Media Server Package Information
ENV PKG_NAME logitechmediaserver
ENV PKG_VER 7.8.0
# Install Logitech Media Server
RUN apt-get update && apt-get install -y --force-yes \
#avahi-daemon \
#avahi-utils \
git \
libao-dev \
libcrypt-openssl-rsa-perl \
libio-socket-inet6-perl \
libio-socket-ssl-perl \
libmodule-build-perl \
libssl-dev \
libwww-perl \
locales \
make \
pkg-config \
supervisor \
wget
# Install Logitech Media Server
RUN wget -O /tmp/${PKG_NAME}.deb http://downloads.slimdevices.com/LogitechMediaServer_v${PKG_VER}/${PKG_NAME}_${PKG_VER}_all.deb \
&& dpkg -i /tmp/${PKG_NAME}.deb
WORKDIR /tmp
#Clone Git Repos
#RUN git clone --depth=1 https://github.com/njh/perl-net-sdp.git perl-net-sdp \
# && git clone --depth=1 https://github.com/StuartUSA/shairport_plugin.git shairport_plugin
#WORKDIR /tmp/perl-net-sdp
#Build Perl Net::SDP
#RUN perl ./Build.PL \
# && ./Build \
# && ./Build install
#WORKDIR /tmp/shairport_plugin/shairport_helper/src
#Build and install Shairport Helper
#RUN make \
# && mv ./shairport_helper /usr/local/bin
RUN chown -R nobody:users /usr/share/squeezeboxserver/
# Set Locale
ENV LANG en_US.UTF-8
RUN locale-gen $LANG
# Copy supervisor.conf script
ADD supervisor.conf /etc/supervisor.conf
#ADD avahi.sh /opt/avahi.sh
# Fix avahi-daemon not working without dbus
#RUN sed -i -e "s#\#enable-dbus=yes#enable-dbus=false#g" /etc/avahi/avahi-daemon.conf
WORKDIR /
# apt clean
RUN apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /tmp/*
# map /config
VOLUME /state
# map /media
VOLUME /media
# expose port for http
EXPOSE 9000
# expose port for telnet
EXPOSE 9090
# Expose port
EXPOSE 3483
EXPOSE 3483/udp
#EXPOSE 631
# Expose Avahi Discovery Port
#EXPOSE 5353/udp
# Run Program
CMD ["supervisord", "-c", "/etc/supervisor.conf", "-n"]