mirror of
https://github.com/linuxserver/docker-mods.git
synced 2026-03-23 00:05:28 +08:00
standardize apt-get
This commit is contained in:
parent
9913b0de3e
commit
c2c90cd034
15
root/etc/cont-init.d/94-nodejs-src
Normal file
15
root/etc/cont-init.d/94-nodejs-src
Normal file
@ -0,0 +1,15 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
|
||||
echo "**** installing nodejs dev environment ****"
|
||||
if ! dpkg -l | grep gnupg > /dev/null; then
|
||||
apt-get update && apt-get install -y gnupg
|
||||
fi
|
||||
|
||||
[[ ! -f "/etc/apt/sources.list.d/nodesource.list" ]] && \
|
||||
curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \
|
||||
echo 'deb https://deb.nodesource.com/node_12.x bionic main' \
|
||||
> /etc/apt/sources.list.d/nodesource.list
|
||||
[[ ! -f "/etc/apt/sources.list.d/yarn.list" ]] && \
|
||||
curl -s https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
|
||||
echo 'deb https://dl.yarnpkg.com/debian/ stable main' \
|
||||
> /etc/apt/sources.list.d/yarn.list
|
||||
3
root/etc/cont-init.d/95-apt-get
Normal file
3
root/etc/cont-init.d/95-apt-get
Normal file
@ -0,0 +1,3 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
|
||||
apt-get update
|
||||
@ -1,17 +1,6 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
|
||||
echo "**** installing nodejs dev environment ****"
|
||||
if ! dpkg -l | grep gnupg > /dev/null; then
|
||||
apt-get update && apt-get install -y gnupg
|
||||
fi
|
||||
[[ ! -f "/etc/apt/sources.list.d/nodesource.list" ]] && \
|
||||
curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \
|
||||
echo 'deb https://deb.nodesource.com/node_12.x bionic main' \
|
||||
> /etc/apt/sources.list.d/nodesource.list
|
||||
[[ ! -f "/etc/apt/sources.list.d/yarn.list" ]] && \
|
||||
curl -s https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
|
||||
echo 'deb https://dl.yarnpkg.com/debian/ stable main' \
|
||||
> /etc/apt/sources.list.d/yarn.list
|
||||
apt-get update && apt-get install -y \
|
||||
nodejs \
|
||||
yarn
|
||||
echo "**** Installing nodejs and yarn"
|
||||
apt-get install -y \
|
||||
nodejs \
|
||||
yarn
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user