docker-homebridge
docker-homebridge copied to clipboard
Update node.js from 16.16.0 to 16.17.0?
Current Situation
2 plugins report they need an update, a prerequisite is node.js version 16.17.0 i.s.o. 16.16.0. When I issue the commands
docker-compose pull
docker-compose up -d
I get the message node.js is up-to-date; but actually it is still version 16.16.0. Any idea how to upgrade to 16.17.0?
Docker Config
version: '2'
services:
homebridge:
image: oznu/homebridge:ubuntu
container_name: homebridge
restart: always
network_mode: host
environment:
- TZ=Australia/Sydney
- PGID=1000
- PUID=1000
- HOMEBRIDGE_CONFIG_UI=1
- HOMEBRIDGE_CONFIG_UI_PORT=8581
volumes:
- ./homebridge:/homebridge
Logs
No response
Host Operating System
Raspberry Pi OS - Latest
Host Architecture
armv7l
yes, i also am waiting on an updated node.js before i can update plugins.
guess it's not going to happen? is this now a dead project?
Hmm.. something's weird here.
I quickly looked into it and the internally used Debian package by the docker container comes from here, with uses a bundled NodeJS version as described here.
So the .deb
package determines the bundled Node version via this line, which resolves as v16.17.1
if I execute it on my machine. Also the correct version for the .deb
package is set in the Dockerfile
to apply this version.
So in theory, the correct NodeJS version should be installed but I don't know what the problem is exactly...
But here's a workaround for you guys for the time being:
Access a shell in the docker container
(The name of the docker container is homebridge
)
sudo docker exec -it homebridge bash
Update NodeJS in the docker container
hb-service update-node
Exit the container with exit
.
Restart Homebridge via web interface.
Please note, that you may have to execute this again if you ~restart~ delete your container.
It would be preferable if the "standard" way of updating would work, but this workaround worked well. Thx for the quick respons and a working solution.
@deg0nz the 1.0.29 build of homebridge/homebridge-apt-pkg ran on 09/08/2022, at that time Node's v16 LTS was v16.16.0
2022-08-09T04:51:03.4686319Z ++ jq -r 'map(select(.lts))[0].version'
2022-08-09T04:51:03.4686727Z ++ curl -s https://nodejs.org/dist/index.json
2022-08-09T04:51:03.5409220Z + NODE_VERSION=v16.16.0
2022-08-09T04:51:03.5409681Z + BUILD_ARCH=x86_64
2022-08-09T04:51:03.5409874Z + case "$BUILD_ARCH" in
2022-08-09T04:51:03.5410060Z + NODE_ARCH=x64
2022-08-09T04:51:03.5410560Z + '[' '!' -f node-v16.16.0-linux-x64.tar.gz ']'
2022-08-09T04:51:03.5410851Z + '[' x64 = armv6l -o x64 = x86 ']'
2022-08-09T04:51:03.5411239Z + curl -SLO https://nodejs.org/dist/v16.16.0/node-v16.16.0-linux-x64.tar.gz
2022-08-09T04:51:03.5474466Z % Total % Received % Xferd Average Speed Time Time Time Current
2022-08-09T04:51:03.5474809Z Dload Upload Total Spent Left Speed
2022-08-09T04:51:03.5474958Z
2022-08-09T04:51:03.9168502Z 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
2022-08-09T04:51:03.9169133Z 100 31.4M 100 31.4M 0 0 85.2M 0 --:--:-- --:--:-- --:--:-- 85.3M
2022-08-09T04:51:03.9190851Z + tar xzf node-v16.16.0-linux-x64.tar.gz -C staging/opt/homebridge/ --strip-components=1 --no-same-owner
Node v16 LTS was updated to v16.17.0 on 16/08/22 https://nodejs.org/en/blog/release/v16.17.0/
I have just built the APT package locally and it pulls in v16.17.1, the latest Node v16 LTS.
An update is out. Note that it is not "needed", just "recommended" by the plugin author. You can update inside the container at any time by running hb-service update-node
.