mirror of
https://github.com/linuxserver/docker-mstream.git
synced 2026-02-20 04:55:34 +08:00
Run npm install as abc
This commit is contained in:
parent
8f26438325
commit
22af0e4de2
15
Dockerfile
15
Dockerfile
@ -15,14 +15,13 @@ RUN \
|
||||
echo "**** install runtime packages ****" && \
|
||||
apk add --no-cache --upgrade \
|
||||
nodejs \
|
||||
npm \
|
||||
openssl && \
|
||||
npm && \
|
||||
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='[""]'); \
|
||||
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
|
||||
fi && \
|
||||
curl -o \
|
||||
/tmp/mstream.tar.gz -L \
|
||||
@ -31,15 +30,15 @@ RUN \
|
||||
/tmp/mstream.tar.gz -C \
|
||||
/opt/mstream/ --strip-components=1 && \
|
||||
cd /opt/mstream && \
|
||||
npm install --omit=dev && \
|
||||
npm link && \
|
||||
chown -R abc:abc ./ && \
|
||||
su -s /bin/sh abc -c 'HOME=/tmp npm install --omit=dev' && \
|
||||
echo "**** cleanup ****" && \
|
||||
npm cache clean --force && \
|
||||
rm -rf /opt/mstream/save/sync && \
|
||||
rm -rf /config/.npm && \
|
||||
ln -s /config/sync /opt/mstream/save/sync && \
|
||||
rm -rf \
|
||||
/tmp/*
|
||||
$HOME/.cache \
|
||||
/tmp/* \
|
||||
/tmp/.npm
|
||||
|
||||
# add local files
|
||||
COPY root/ /
|
||||
|
||||
@ -15,14 +15,13 @@ RUN \
|
||||
echo "**** install runtime packages ****" && \
|
||||
apk add --no-cache --upgrade \
|
||||
nodejs \
|
||||
npm \
|
||||
openssl && \
|
||||
npm && \
|
||||
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='[""]'); \
|
||||
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
|
||||
fi && \
|
||||
curl -o \
|
||||
/tmp/mstream.tar.gz -L \
|
||||
@ -31,15 +30,15 @@ RUN \
|
||||
/tmp/mstream.tar.gz -C \
|
||||
/opt/mstream/ --strip-components=1 && \
|
||||
cd /opt/mstream && \
|
||||
npm install --omit=dev && \
|
||||
npm link && \
|
||||
chown -R abc:abc ./ && \
|
||||
su -s /bin/sh abc -c 'HOME=/tmp npm install --omit=dev' && \
|
||||
echo "**** cleanup ****" && \
|
||||
npm cache clean --force && \
|
||||
rm -rf /opt/mstream/save/sync && \
|
||||
rm -rf /config/.npm && \
|
||||
ln -s /config/sync /opt/mstream/save/sync && \
|
||||
rm -rf \
|
||||
/tmp/*
|
||||
$HOME/.cache \
|
||||
/tmp/* \
|
||||
/tmp/.npm
|
||||
|
||||
# add local files
|
||||
COPY root/ /
|
||||
|
||||
@ -15,14 +15,13 @@ RUN \
|
||||
echo "**** install runtime packages ****" && \
|
||||
apk add --no-cache --upgrade \
|
||||
nodejs \
|
||||
npm \
|
||||
openssl && \
|
||||
npm && \
|
||||
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='[""]'); \
|
||||
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
|
||||
fi && \
|
||||
curl -o \
|
||||
/tmp/mstream.tar.gz -L \
|
||||
@ -31,15 +30,15 @@ RUN \
|
||||
/tmp/mstream.tar.gz -C \
|
||||
/opt/mstream/ --strip-components=1 && \
|
||||
cd /opt/mstream && \
|
||||
npm install --omit=dev && \
|
||||
npm link && \
|
||||
chown -R abc:abc ./ && \
|
||||
su -s /bin/sh abc -c 'HOME=/tmp npm install --omit=dev' && \
|
||||
echo "**** cleanup ****" && \
|
||||
npm cache clean --force && \
|
||||
rm -rf /opt/mstream/save/sync && \
|
||||
rm -rf /config/.npm && \
|
||||
ln -s /config/sync /opt/mstream/save/sync && \
|
||||
rm -rf \
|
||||
/tmp/*
|
||||
$HOME/.cache \
|
||||
/tmp/* \
|
||||
/tmp/.npm
|
||||
|
||||
# add local files
|
||||
COPY root/ /
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user