-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile
83 lines (66 loc) · 2.1 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
FROM phusion/baseimage:focal-1.2.0
#########################################
## SET LABELS ##
#########################################
# set version and maintainer label
ARG BUILD_DATE
ARG VERSION
LABEL build_version="Version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="Logicwar <[email protected]>"
#########################################
## ENVIRONMENTAL CONFIG ##
#########################################
# Set correct environment variables
ENV HOME="/root" LC_ALL="C.UTF-8" LANG="en_US.UTF-8" LANGUAGE="en_US.UTF-8"
# Use baseimage-docker's init system.
CMD ["/sbin/my_init"]
#########################################
## DOWNLOAD PACKAGES ##
#########################################
# Download and install Dependencies
RUN \
echo "**** Install Dependencies ****" && \
apt-get update && \
apt-get install -y \
libio-socket-ssl-perl \
libcrypt-openssl-bignum-perl \
libcrypt-openssl-random-perl \
libcrypt-openssl-rsa-perl \
lame faad flac sox \
wget && \
rm -rf \
/var/lib/apt/lists/* \
/tmp/* \
/var/tmp/*
# Download and install Main Software
RUN \
echo "**** Install latest Logitech Media Server package ****" && \
os=$(dpkg --print-architecture) && \
if [ "$os" = "armhf" ]; then os=arm; fi &&\
url="http://www.mysqueezebox.com/update/?version=8.3.1&revision=1&geturl=1&os=deb$os" && \
latest_lms=$(wget -q -O - "$url") && \
mkdir -p /sources && \
cd /sources && \
wget $latest_lms && \
lms_deb=${latest_lms##*/} && \
dpkg -i $lms_deb && \
echo "**** cleanup ****" && \
apt-get clean && \
rm -rf \
/sources
#########################################
## COPY & RUN SETUP SCRIPT ##
#########################################
# copy setup, default parameters and init files
COPY root/ /
# set permissions and run setup script
RUN \
chmod -R +x /etc/service/ && \
chmod +x /setup.sh; sync && \
/setup.sh && \
rm /setup.sh
#########################################
## EXPORTS AND VOLUMES ##
#########################################
EXPOSE 3483 3483/udp 9000
VOLUME /config /music /playlist