Skip to content

Commit 0f3b227

Browse files
committed
First build
1 parent 3eb9a37 commit 0f3b227

6 files changed

Lines changed: 186 additions & 0 deletions

File tree

Dockerfile

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
FROM lsiobase/alpine:3.9
2+
3+
# set version label
4+
ARG BUILD_DATE
5+
ARG VERSION
6+
ARG MSTREAM_RELEASE
7+
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
8+
LABEL maintainer="chbmb"
9+
10+
RUN \
11+
echo "**** install build packages ****" && \
12+
apk add --no-cache --virtual=build-dependencies \
13+
curl \
14+
git && \
15+
echo "**** install runtime packages ****" && \
16+
apk add --no-cache --upgrade \
17+
nodejs \
18+
npm && \
19+
echo "**** install app ****" && \
20+
mkdir -p \
21+
/opt/mstream && \
22+
if [ -z ${MSTREAM_RELEASE+x} ]; then \
23+
MSTREAM_RELEASE=$(curl -sX GET "https://api.github.com/repos/IrosTheBeggar/mStream/releases/latest" \
24+
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
25+
fi && \
26+
curl -o \
27+
/tmp/mstream.tar.gz -L \
28+
"https://github.com/IrosTheBeggar/mStream/archive/${MSTREAM_RELEASE}.tar.gz" && \
29+
tar xzf \
30+
/tmp/mstream.tar.gz -C \
31+
/opt/mstream/ --strip-components=1 && \
32+
cd /opt/mstream && \
33+
npm install --only=production && \
34+
npm link && \
35+
echo "**** cleanup ****" && \
36+
apk del --purge \
37+
build-dependencies && \
38+
rm -rf \
39+
/tmp/*
40+
41+
# add local files
42+
COPY root/ /
43+
44+
# ports and volumes
45+
EXPOSE 3000
46+
VOLUME /config /music

Dockerfile.aarch64

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
FROM lsiobase/alpine:arm64v8-3.9
2+
3+
# set version label
4+
ARG BUILD_DATE
5+
ARG VERSION
6+
ARG MSTREAM_RELEASE
7+
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
8+
LABEL maintainer="chbmb"
9+
10+
RUN \
11+
echo "**** install build packages ****" && \
12+
apk add --no-cache --virtual=build-dependencies \
13+
git && \
14+
echo "**** install runtime packages ****" && \
15+
apk add --no-cache --upgrade \
16+
nodejs \
17+
npm && \
18+
echo "**** install app ****" && \
19+
mkdir -p \
20+
/opt/mstream && \
21+
if [ -z ${MSTREAM_RELEASE+x} ]; then \
22+
MSTREAM_RELEASE=$(curl -sX GET "https://api.github.com/repos/IrosTheBeggar/mStream/releases/latest" \
23+
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
24+
fi && \
25+
curl -o \
26+
/tmp/mstream.tar.gz -L \
27+
"https://github.com/IrosTheBeggar/mStream/archive/${MSTREAM_RELEASE}.tar.gz" && \
28+
tar xf \
29+
/tmp/mstream.tar.gz -C \
30+
/opt/mstream/ --strip-components=1 && \
31+
cd /opt/mstream && \
32+
npm install --only=production && \
33+
npm link
34+
echo "**** cleanup ****" && \
35+
apk del --purge \
36+
build-dependencies && \
37+
rm -rf \
38+
/tmp/*
39+
40+
# add local files
41+
COPY root/ /
42+
43+
# ports and volumes
44+
EXPOSE 3000
45+
VOLUME /config /music

Dockerfile.armhf

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
FROM lsiobase/alpine:arm32v7-3.9
2+
3+
# set version label
4+
ARG BUILD_DATE
5+
ARG VERSION
6+
ARG MSTREAM_RELEASE
7+
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
8+
LABEL maintainer="chbmb"
9+
10+
RUN \
11+
echo "**** install build packages ****" && \
12+
apk add --no-cache --virtual=build-dependencies \
13+
git && \
14+
echo "**** install runtime packages ****" && \
15+
apk add --no-cache --upgrade \
16+
nodejs \
17+
npm && \
18+
echo "**** install app ****" && \
19+
mkdir -p \
20+
/opt/mstream && \
21+
if [ -z ${MSTREAM_RELEASE+x} ]; then \
22+
MSTREAM_RELEASE=$(curl -sX GET "https://api.github.com/repos/IrosTheBeggar/mStream/releases/latest" \
23+
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
24+
fi && \
25+
curl -o \
26+
/tmp/mstream.tar.gz -L \
27+
"https://github.com/IrosTheBeggar/mStream/archive/${MSTREAM_RELEASE}.tar.gz" && \
28+
tar xf \
29+
/tmp/mstream.tar.gz -C \
30+
/opt/mstream/ --strip-components=1 && \
31+
cd /opt/mstream && \
32+
npm install --only=production && \
33+
npm link
34+
echo "**** cleanup ****" && \
35+
apk del --purge \
36+
build-dependencies && \
37+
rm -rf \
38+
/tmp/*
39+
40+
# add local files
41+
COPY root/ /
42+
43+
# ports and volumes
44+
EXPOSE 3000
45+
VOLUME /config /music

readme-vars.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
project_name: mstream
2+
project_url: "https://github.com/IrosTheBeggar/mStream"
3+
project_logo: "https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/mstream.png"
4+
project_blurb: |
5+
[{{ project_name|capitalize }}]({{ project_url }}) is a personal music streaming server. You can use mStream to stream your music from your home computer to any device, anywhere.
6+
project_lsio_github_repo_url: "https://github.com/linuxserver/docker-{{ project_name }}"
7+
8+
# supported architectures
9+
available_architectures:
10+
- { arch: "{{ arch_x86_64 }}", tag: "amd64-latest"}
11+
- { arch: "{{ arch_arm64 }}", tag: "arm64v8-latest"}
12+
- { arch: "{{ arch_armhf }}", tag: "arm32v7-latest"}
13+
14+
# container parameters
15+
param_container_name: "{{ project_name }}"
16+
param_usage_include_vols: true
17+
param_volumes:
18+
- { vol_path: "/config", vol_host_path: "<path to data>", desc: "mStream config" }
19+
- { vol_path: "/music", vol_host_path: "<path to music>", desc: "Music location" }
20+
param_usage_include_ports: true
21+
param_ports:
22+
- { external_port: "3000", internal_port: "3000", port_desc: "The port for the mStream webinterface" }
23+
param_usage_include_env: true
24+
param_env_vars:
25+
- { env_var: "TZ", env_value: "Europe/London", desc: "Specify a timezone to use e.g. Europe/London" }
26+
27+
# application setup block
28+
app_setup_block_enabled: true
29+
app_setup_block: |
30+
Access the webui at `http://<your-ip>:3000`, for more information check out [{{ project_name|capitalize }}]({{ project_url }}).
31+
32+
# changelog
33+
changelogs:
34+
- { date: "28.09.16:", desc: "Inital Release" }

root/etc/cont-init.d/30-config

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/usr/bin/with-contenv bash
2+
3+
# make folders
4+
mkdir -p \
5+
/config/album_art \
6+
/config/db
7+
8+
# permissions
9+
chown abc:abc -R \
10+
/config

root/etc/services.d/mstream/run

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/with-contenv bash
2+
3+
cd /opt/mstream || exit
4+
5+
exec \
6+
s6-setuidgid abc /opt/mstream/mstream -d /config/db -I /config/album-art -j /config/config.json -m /music -u ${USER} -x ${PASSWORD}

0 commit comments

Comments
 (0)