* Update nodejs yolks
Move user creation and env to not rebuild on every update if not needed.
update apt install command to new format
update npm install command to properly be global to resolve ts-node issue
update npm install commands to install latest version available for node version
* fix build
moves section that sets the user and env vars to the bottom again.
I forgot the order of ops matters.
* fix issues with corepack
npm doesn't install a working version of corepack unless it's tagged to latest.
- Added Nodejs version 22 and 23
- Starting Nodejs 20, 22, and above will not use the Debian version code name to follow the release of the latest Debian operating system version in the future
- In Dockerfile Nodejs 18, and 21 will install npm version 10.x.x
- Added Nodejs version 22 and 23
- Starting Nodejs 20, 22, and above will not use the Debian version code name to follow the release of the latest Debian operating system version in the future
- In Dockerfile Nodejs 18, and 21 will install npm version 10.x.x
The latest version of NPM for NodeJS 17 going off https://nodejs.org/en/download/releases is 8.11.0. Leaving it as @latest results in the following error during build:
=> ERROR [3/5] RUN npm install npm@latest--location=global 0.9s
------
> [3/5] RUN npm install npm@latest--location=global:
#0 0.846 npm ERR! code EINVALIDTAGNAME
#0 0.847 npm ERR! Invalid tag name "latest--location=global" of package "npm@latest--location=global": Tags may not have any characters that encodeURIComponent encodes.
#0 0.849
#0 0.849 npm ERR! A complete log of this run can be found in:
#0 0.849 npm ERR! /root/.npm/_logs/2023-05-14T21_06_16_353Z-debug-0.log
------
Dockerfile:9
--------------------
7 | && useradd -m -d /home/container container
8 |
9 | >>> RUN npm install npm@latest--location=global
10 |
11 | USER container
--------------------
ERROR: failed to solve: process "/bin/sh -c npm install npm@latest--location=global" did not complete successfully: exit code: 1
Additionally, there was a message during build about -g being depreciated and using --location=global instead, so I figured as long as I'm making a change to this anyways I may as well switch that out. With the first change it builds successfully, with the second change it builds successfully without the depreciation message.
New IP route output appends UID to the result, causing the value to be set to that instead of the IP. Fix it by ignoring the last two appended UID results