Closed notexpected closed 1 year ago
Hi - can you make sure you've pulled the latest nodered/node-red
? The logs show you've ended up with Node-RED 2.2 - but that hasn't been the :latest
image for quite some time.
$ docker pull nodered/node-red
...
Digest: sha256:c9ab40bfd7957f17dbd5724e41160068df54530e9d1142d32104d5decb3e4371
$ docker run -it -p 1887 --name mynodered2 nodered/node-red
26 May 14:16:07 - [info]
Welcome to Node-RED
===================
26 May 14:16:07 - [info] Node-RED version: v3.0.2
26 May 14:16:07 - [info] Node.js version: v16.20.0
Thanks, this helps me notice what I missed in the docs about the suffix on the latest tag.
When I use nodered/node-red and build the config, I get the latest-18
tag
docker compose build node-red
[+] Building 20.8s (4/5)
=> [node-red internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 441B 0.0s
=> [node-red internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [node-red internal] load metadata for docker.io/nodered/node-red:latest-18
If I change it back to nodered/node-red:latest and re-build the config, it still incorrectly tells me the "latest" tagged version is sha256:33334eab19f40e33dfc8a66bfae485fd8936af73dbe7da04dc21c33264f01f52
(digest 33334eab19f4
), which is not the same[1] as the actual latest (sha256:84db99f5c4615f146062003f8d8e1aa308c4337b6df9d5fd4668895650c8c94e
) on docker hub...
Seems like an issue in my docker instance as docker compose build
did not seem to force it to find the new latest...
[1] I can't even find a corresponding package with that digest...so I am going to clear my caches... sorry for the noise
No problem - I'll close this issue off
You need to run docker pull nodered/node-red:latest
to ensure that your local build environment has pulled the most up to date version.
If you don't do this then it will use what ever it has locally with the tag. Docker does NOT pull pre-req contianers when you build a Dockerfile
I don't know if this will help but I use these aliases:
alias BUILD='docker-compose -f ~/IOTstack/docker-compose.yml up --build -d'
alias REBUILD='docker-compose -f ~/IOTstack/docker-compose.yml build --no-cache --pull'
alias UP='docker-compose -f ~/IOTstack/docker-compose.yml up -d'
substituting the path to your
docker-compose.yml
If I want to rebuild a container (eg nodered) from the ground up and be sure the base image comes from Dockerhub:
$ REBUILD nodered
$ UP nodered
If I only need to rerun the local Dockerfile:
$ BUILD nodered
See also IOTstackAliases.
Okay, so I figured out why I was really confused... I have been using watchtower for soooo long that I had forgotten the nuances of DockerFile. I had assumed it was updating everything (which it was except for the one thing that was in a Dockerfile)....
I ended up removing the Dockerfiler as it was not adding real value since I moved things into a compose file
Issue seems to be related to the docker image is not running the recommended Node Version 16 documented here. https://nodered.org/docs/faq/node-versions
What are the steps to reproduce?
Docker File:
Attempt to start the above image
What happens?
node-red-contrib-home-assistant-websocket fails to install with:
node-red | 26 May 13:50:37 - [warn] [node-red-contrib-home-assistant-websocket] Node module cannot be loaded on this version. Requires: >=3.0.0
What do you expect to happen?
It installs properally
Please tell us about your environment:
[ ] Platform/OS: Ubuntu Docker version 24.0.1, build 6802122
Logs