Merge pull request #10 from sparklyballs/alpine

alpine rebase
master
sparklyballs 9 years ago committed by GitHub
commit da15618055

@ -1,29 +1,81 @@
FROM linuxserver/baseimage.python
MAINTAINER smdion <me@seandion.com> ,Sparklyballs <sparklyballs@linuxserver.io>
ENV BEETSDIR /config
ENV APTLIST="ffmpeg lame libav-tools libchromaprint-tools libjpeg8-dev libopenjpeg-dev libpng12-dev libyaml-dev mp3gain python2.7"
# copy sources.list
COPY sources.list /etc/apt/
RUN add-apt-repository ppa:fkrull/deadsnakes-python2.7 && \
add-apt-repository ppa:kirillshkrogalev/ffmpeg-next && \
apt-get update -q && \
apt-get install $APTLIST -qy && \
pip install -U pyacoustid && \
pip install -U pylast && \
pip install -U flask && \
pip install -U pillow && \
pip install -U beets && \
apt-get clean && rm -rf /tmp/* /var/lib/apt/lists/* /var/tmp/* /root/.cache
#Adding Custom files
ADD init/ /etc/my_init.d/
ADD services/ /etc/service/
ADD defaults/ /defaults/
RUN chmod -v +x /etc/service/*/run /etc/my_init.d/*.sh
# Volumes and Ports
VOLUME /config /downloads /music
FROM lsiobase/alpine
MAINTAINER sparklyballs
# environment settings
ENV BEETSDIR="/config"
# install runtime packages
RUN \
apk add --no-cache \
curl \
expat \
ffmpeg \
ffmpeg-libs \
gdbm \
jpeg \
lame \
libffi \
libpng \
openjpeg \
py-pip \
python \
py-unidecode \
sqlite-libs \
wget && \
# install build packages
apk add --no-cache --virtual=build-dependencies \
cmake \
ffmpeg-dev \
g++ \
gcc \
git \
jpeg-dev \
libpng-dev \
make \
openjpeg-dev \
python-dev && \
# compile mp3gain
mkdir -p \
/tmp/mp3gain-src && \
curl -o \
/tmp/mp3gain-src/mp3gain.zip -L \
https://sourceforge.net/projects/mp3gain/files/mp3gain/1.5.2/mp3gain-1_5_2_r2-src.zip && \
cd /tmp/mp3gain-src && \
unzip -qq /tmp/mp3gain-src/mp3gain.zip && \
make && \
make install && \
# compile chromaprint
git clone https://bitbucket.org/acoustid/chromaprint.git \
/tmp/chromaprint && \
cd /tmp/chromaprint && \
cmake \
-DBUILD_EXAMPLES=ON . \
-DCMAKE_BUILD_TYPE=Release && \
make && \
make install && \
# install pip packages
pip install --no-cache-dir -U \
beets \
flask \
pillow \
pip \
pyacoustid \
pylast && \
# cleanup
apk del --purge \
build-dependencies && \
rm -rf \
/root/.cache \
/tmp/*
# copy local files
COPY root/ /
# ports and volumes
EXPOSE 8337
VOLUME /config /downloads /music

@ -24,7 +24,6 @@ The [LinuxServer.io][linuxserverurl] team brings you another container release f
```
docker create \
--name=beets \
-v /etc/localtime:/etc/localtime:ro \
-v <path to data>:/config \
-e PGID=<gid> -e PUID=<uid> \
-p 1234:1234 \
@ -34,14 +33,13 @@ linuxserver/beets
**Parameters**
* `-p 8337` - the port(s)
* `-v /etc/localtime` for timesync - *optional*
* `-v /config` - Configuration files
* `-v /music` - Music library location
* `-v /downloads` - Non-processed music
* `-e PGID` for GroupID - see below for explanation
* `-e PUID` for UserID - see below for explanation
It is based on phusion-baseimage with ssh removed, for shell access whilst the container is running do `docker exec -it beets /bin/bash`.
It is based on alpine linux with s6 overlay, for shell access whilst the container is running do `docker exec -it beets /bin/bash`.
### User / Group Identifiers
@ -58,14 +56,14 @@ In this instance `PUID=1001` and `PGID=1001`. To find yours use `id user` as bel
Edit the config file in /config
## Updates
## Info
* Upgrade to the latest version simply `docker restart beets`.
* To monitor the logs of the container in realtime `docker logs -f beets`.
## Versions
+ **24.09.16:** Rebase to alpine linux.
+ **10.09.16:** Add layer badges to README.
+ **05.01.16:** Change ffpmeg repository, other version crashes container
+ **06.11.15:** Initial Release

@ -1,10 +0,0 @@
#!/bin/bash
# opt out for autoupdates
[ "$ADVANCED_DISABLEUPDATES" ] && exit 0
pip install -U pyacoustid
pip install -U pylast
pip install -U flask
pip install -U pillow
pip install -U beets

@ -1,7 +0,0 @@
#!/bin/bash
[[ ! -f /config/beets.sh ]] && cp /defaults/beets.sh /config/beets.sh
[[ ! -f /config/config.yaml ]] && cp /defaults/config.yaml /config/config.yaml
chown -R abc:abc /config

@ -0,0 +1,11 @@
#!/usr/bin/with-contenv bash
# copy config
[[ ! -e /config/beets.sh ]] && \
cp /defaults/beets.sh /config/beets.sh
[[ ! -e /config/config.yaml ]] && \
cp /defaults/config.yaml /config/config.yaml
# permissions
chown -R abc:abc \
/config

@ -0,0 +1,5 @@
#!/usr/bin/with-contenv bash
umask 002
exec \
s6-setuidgid abc beet web

@ -1,4 +0,0 @@
#!/bin/bash
umask 002
/sbin/setuser abc beet web

@ -1,34 +0,0 @@
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://archive.ubuntu.com/ubuntu/ trusty main restricted
deb-src http://archive.ubuntu.com/ubuntu/ trusty main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://archive.ubuntu.com/ubuntu/ trusty-updates main restricted
deb-src http://archive.ubuntu.com/ubuntu/ trusty-updates main restricted
## Uncomment the following two lines to add software from the 'universe'
## repository.
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://archive.ubuntu.com/ubuntu/ trusty universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ trusty universe multiverse
deb http://archive.ubuntu.com/ubuntu/ trusty-updates universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ trusty-updates universe multiverse
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
# deb http://archive.ubuntu.com/ubuntu/ trusty-backports main restricted
# deb-src http://archive.ubuntu.com/ubuntu/ trusty-backports main restricted
deb http://archive.ubuntu.com/ubuntu/ trusty-security main restricted
deb-src http://archive.ubuntu.com/ubuntu/ trusty-security main restricted
deb http://archive.ubuntu.com/ubuntu/ trusty-security universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ trusty-security universe multiverse
Loading…
Cancel
Save