restructure dockerfile

This commit is contained in:
sparklyballs 2015-09-29 10:38:26 +01:00
parent d154cd6791
commit bb149153f5

View File

@ -1,7 +1,10 @@
FROM linuxserver/baseimage
MAINTAINER sparklyballs <sparklyballs@linuxserver.io>
ENV HOME /root
ENV HOME /root
ENV APTLIST="avahi-daemon libavahi-client3 libantlr3c-3.2-0 libasound2 libconfuse0 libflac8 libgcrypt20 libmxml1 libogg0 libplist1 libunistring0"
ENV BUILD_APTLIST="antlr3 autoconf automake build-essential cmake gettext git-core gperf libantlr3c-dev libasound2-dev libavahi-client-dev libconfuse-dev libflac-dev libgcrypt20-dev libplist-dev libtool libunistring-dev libmxml-dev wget yasm zlib1g-dev"
# add some files required before we build the packages
ADD prebuild /prebuild/
@ -10,27 +13,7 @@ ADD prebuild /prebuild/
RUN mv /prebuild/excludes /etc/dpkg/dpkg.cfg.d/excludes && \
apt-get update && \
apt-get install --no-install-recommends \
automake \
gperf \
gettext \
libtool \
yasm \
autoconf \
libgcrypt20-dev \
cmake \
build-essential \
libflac-dev \
antlr3 \
libasound2-dev \
libplist-dev \
libmxml-dev \
zlib1g-dev \
libunistring-dev \
libantlr3c-dev \
git-core \
wget \
libavahi-client-dev \
libconfuse-dev -qy && \
$BUILD_APTLIST -qy && \
# build curl package
cd /tmp && \
@ -104,43 +87,13 @@ cd / && \
# clean build dependencies
apt-get purge --remove \
automake \
gperf \
gettext \
libtool \
yasm \
autoconf \
libgcrypt20-dev \
cmake \
build-essential \
libflac-dev \
antlr3 \
libasound2-dev \
libplist-dev \
libmxml-dev \
zlib1g-dev \
libunistring-dev \
libantlr3c-dev \
git-core \
wget \
libavahi-client-dev \
libconfuse-dev -y && \
$BUILD_APTLIST -y && \
apt-get -y autoremove && \
# install runtime dependencies
apt-get update -q && \
apt-get install \
libgcrypt20 \
libavahi-client3 \
libflac8 \
libogg0 \
libantlr3c-3.2-0 \
libasound2 \
libplist1 \
libmxml1 \
libunistring0 \
avahi-daemon \
libconfuse0 -qy && \
$APTLIST -qy && \
apt-get clean && rm -rf /tmp/* /var/lib/apt/lists/* /var/tmp/*
# set volumes
@ -161,3 +114,4 @@ sed -i s#/var/log/forked-daapd.log#/config/dbase_and_logs/forked-daapd.log#g /et
sed -i "/db_path\ =/ s/# *//" /etc/forked-daapd.conf && \
sed -i "/cache_path\ =/ s/# *//" /etc/forked-daapd.conf && \
cp /etc/forked-daapd.conf /defaults/forked-daapd.conf