update node setup in dockerfile

This commit is contained in:
buanet
2023-09-03 22:31:41 +02:00
parent bbe6c2763e
commit 21cf38611c
2 changed files with 7 additions and 2 deletions

View File

@@ -1,7 +1,8 @@
## Changelog ## Changelog
### v9.0.0-beta.1 (coming soon) ### v9.0.0-beta.1 (coming soon)
* updating base image to debian 12 (bookworm) * update nodejs setup process
* update base image to debian 12 (bookworm)
* improve security by avoiding running commands as root * improve security by avoiding running commands as root
* integrate calling maintenance script into iobroker command * integrate calling maintenance script into iobroker command
* move container config files location * move container config files location

View File

@@ -21,8 +21,10 @@ RUN apt-get update && apt-get upgrade -y \
# Install prerequisites # Install prerequisites
&& apt-get install -y \ && apt-get install -y \
apt-utils \ apt-utils \
ca-certificates \
cifs-utils \ cifs-utils \
curl \ curl \
gnupg \
gosu \ gosu \
iputils-ping \ iputils-ping \
jq \ jq \
@@ -36,7 +38,9 @@ RUN apt-get update && apt-get upgrade -y \
udev \ udev \
wget \ wget \
# Install node # Install node
&& curl -sL https://deb.nodesource.com/setup_${NODE}.x | bash - \ && mkdir -p /etc/apt/keyrings \
&& curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
&& echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_${NODE}.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \
&& apt-get update && apt-get install -y nodejs \ && apt-get update && apt-get install -y nodejs \
# Install node-gyp # Install node-gyp
&& npm install --production -g node-gyp \ && npm install --production -g node-gyp \