docker-mstream/Dockerfile
2020-06-06 22:56:34 -07:00

48 lines
1.2 KiB
Docker
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

FROM lsiobase/alpine:3.12
# 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 xzf \
/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