Docker: Add install-nodejs.sh script
This commit is contained in:
parent
c76d0e27ba
commit
c1222b2572
|
@ -73,10 +73,7 @@ RUN apt-get update && apt-get -qq dist-upgrade && apt-get -qq install --no-insta
|
||||||
ffmpegthumbnailer \
|
ffmpegthumbnailer \
|
||||||
libavcodec-extra \
|
libavcodec-extra \
|
||||||
sudo && \
|
sudo && \
|
||||||
curl -sL https://deb.nodesource.com/setup_16.x | bash - && \
|
/root/.local/bin/install-nodejs.sh && \
|
||||||
apt-get update && apt-get -qq install nodejs && \
|
|
||||||
npm install --unsafe-perm=true --allow-root -g npm && \
|
|
||||||
npm config set cache ~/.cache/npm && \
|
|
||||||
apt-get -y autoremove && apt-get -y autoclean && apt-get -y clean && rm -rf /var/lib/apt/lists/* && \
|
apt-get -y autoremove && apt-get -y autoclean && apt-get -y clean && rm -rf /var/lib/apt/lists/* && \
|
||||||
/root/.local/bin/install-tensorflow.sh ${TARGETARCH} && \
|
/root/.local/bin/install-tensorflow.sh ${TARGETARCH} && \
|
||||||
mkdir -p "/go/src" "/go/bin" && \
|
mkdir -p "/go/src" "/go/bin" && \
|
||||||
|
|
|
@ -86,10 +86,7 @@ RUN apt-get update && apt-get -qq dist-upgrade && apt-get -qq install --no-insta
|
||||||
chrpath \
|
chrpath \
|
||||||
lsof \
|
lsof \
|
||||||
apache2-utils && \
|
apache2-utils && \
|
||||||
curl -sL https://deb.nodesource.com/setup_16.x | bash - && \
|
/root/.local/bin/install-nodejs.sh && \
|
||||||
apt-get update && apt-get -qq install nodejs && \
|
|
||||||
npm install --unsafe-perm=true --allow-root -g npm && \
|
|
||||||
npm config set cache ~/.cache/npm && \
|
|
||||||
/root/.local/bin/install-darktable.sh ${TARGETARCH} && \
|
/root/.local/bin/install-darktable.sh ${TARGETARCH} && \
|
||||||
/root/.local/bin/install-tensorflow.sh ${TARGETARCH} && \
|
/root/.local/bin/install-tensorflow.sh ${TARGETARCH} && \
|
||||||
apt-get -y autoremove && apt-get -y autoclean && apt-get -y clean && rm -rf /var/lib/apt/lists/* && \
|
apt-get -y autoremove && apt-get -y autoclean && apt-get -y clean && rm -rf /var/lib/apt/lists/* && \
|
||||||
|
|
|
@ -85,10 +85,7 @@ RUN apt-get update && apt-get -qq dist-upgrade && apt-get -qq install --no-insta
|
||||||
chrpath \
|
chrpath \
|
||||||
lsof \
|
lsof \
|
||||||
apache2-utils && \
|
apache2-utils && \
|
||||||
curl -sL https://deb.nodesource.com/setup_16.x | bash - && \
|
/root/.local/bin/install-nodejs.sh && \
|
||||||
apt-get update && apt-get -qq install nodejs && \
|
|
||||||
npm install --unsafe-perm=true --allow-root -g npm && \
|
|
||||||
npm config set cache ~/.cache/npm && \
|
|
||||||
/root/.local/bin/install-darktable.sh ${TARGETARCH} && \
|
/root/.local/bin/install-darktable.sh ${TARGETARCH} && \
|
||||||
/root/.local/bin/install-tensorflow.sh ${TARGETARCH} && \
|
/root/.local/bin/install-tensorflow.sh ${TARGETARCH} && \
|
||||||
apt-get -y autoremove && apt-get -y autoclean && apt-get -y clean && rm -rf /var/lib/apt/lists/* && \
|
apt-get -y autoremove && apt-get -y autoclean && apt-get -y clean && rm -rf /var/lib/apt/lists/* && \
|
||||||
|
|
|
@ -82,10 +82,7 @@ RUN apt-get update && apt-get -qq dist-upgrade && apt-get -qq install --no-insta
|
||||||
apache2-utils \
|
apache2-utils \
|
||||||
fonts-roboto \
|
fonts-roboto \
|
||||||
sudo && \
|
sudo && \
|
||||||
curl -sL https://deb.nodesource.com/setup_16.x | bash - && \
|
/root/.local/bin/install-nodejs.sh && \
|
||||||
apt-get update && apt-get -qq install nodejs && \
|
|
||||||
npm install --unsafe-perm=true --allow-root -g npm && \
|
|
||||||
npm config set cache ~/.cache/npm && \
|
|
||||||
/root/.local/bin/install-darktable.sh ${TARGETARCH} && \
|
/root/.local/bin/install-darktable.sh ${TARGETARCH} && \
|
||||||
/root/.local/bin/install-tensorflow.sh ${TARGETARCH} && \
|
/root/.local/bin/install-tensorflow.sh ${TARGETARCH} && \
|
||||||
/root/.local/bin/install-devtools.sh ${TARGETARCH} && \
|
/root/.local/bin/install-devtools.sh ${TARGETARCH} && \
|
||||||
|
|
13
docker/scripts/install-nodejs.sh
Executable file
13
docker/scripts/install-nodejs.sh
Executable file
|
@ -0,0 +1,13 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# abort if the user is not root
|
||||||
|
if [[ $(id -u) != "0" ]]; then
|
||||||
|
echo "Usage: run install-nodejs.sh as root" 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# install from nodesource.com
|
||||||
|
curl -sL https://deb.nodesource.com/setup_16.x | bash -
|
||||||
|
apt-get update && apt-get -qq install nodejs
|
||||||
|
npm install --unsafe-perm=true --allow-root -g npm
|
||||||
|
npm config set cache ~/.cache/npm
|
Loading…
Reference in a new issue