mirror of
https://github.com/linuxserver/docker-mstream.git
synced 2026-01-21 12:22:37 +08:00
47 lines
1.2 KiB
Docker
47 lines
1.2 KiB
Docker
FROM lsiobase/alpine:arm32v7-3.11
|
||
|
||
# set version label
|
||
ARG BUILD_DATE
|
||
ARG VERSION
|
||
ARG MSTREAM_RELEASE
|
||
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
|
||
LABEL maintainer="chbmb"
|
||
|
||
RUN \
|
||
echo "**** install build packages ****" && \
|
||
apk add --no-cache --virtual=build-dependencies \
|
||
curl \
|
||
git && \
|
||
echo "**** install runtime packages ****" && \
|
||
apk add --no-cache --upgrade \
|
||
nodejs \
|
||
npm \
|
||
openssl && \
|
||
echo "**** install app ****" && \
|
||
mkdir -p \
|
||
/opt/mstream && \
|
||
if [ -z ${MSTREAM_RELEASE+x} ]; then \
|
||
MSTREAM_RELEASE=$(curl -sX GET "https://api.github.com/repos/IrosTheBeggar/mStream/releases/latest" \
|
||
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
|
||
fi && \
|
||
curl -o \
|
||
/tmp/mstream.tar.gz -L \
|
||
"https://github.com/IrosTheBeggar/mStream/archive/${MSTREAM_RELEASE}.tar.gz" && \
|
||
tar xf \
|
||
/tmp/mstream.tar.gz -C \
|
||
/opt/mstream/ --strip-components=1 && \
|
||
cd /opt/mstream && \
|
||
npm install --only=production && \
|
||
npm link && \
|
||
echo "**** cleanup ****" && \
|
||
apk del --purge \
|
||
build-dependencies && \
|
||
rm -rf \
|
||
/tmp/*
|
||
|
||
# add local files
|
||
COPY root/ /
|
||
|
||
# ports and volumes
|
||
EXPOSE 3000
|
||
VOLUME /config /music |