gcgarner / IOTstack

docker stack for getting started on IOT on the Raspberry PI
GNU General Public License v3.0
1.52k stars 582 forks source link

Unused nodered/node-red image #87

Closed Paraphraser closed 5 years ago

Paraphraser commented 5 years ago

I was taking a tour of Portainer when I noticed this small anomaly:

UnusedImage

Not that I doubt Portainer's view of the world but, by way of a sanity check, the nodered/node-red image shows up in the CLI:

$ docker images
REPOSITORY            TAG                 IMAGE ID            CREATED             SIZE
iotstack_nodered      latest              caf3e3ab51d5        9 days ago          394MB
eclipse-mosquitto     latest              d7a0e73ad7a1        13 days ago         5.77MB
portainer/portainer   latest              a7dbced775e5        2 weeks ago         63.8MB
influxdb              latest              3f215d0c31e9        4 weeks ago         226MB
nodered/node-red      latest              b04b04ad7675        5 weeks ago         355MB
grafana/grafana       6.3.6               b28afd63765e        8 weeks ago         157MB
pihole/pihole         latest              1ad60393d9c2        8 weeks ago         292MB

The CLI also agrees (by omission) that the "nodered/node-red" image isn't getting launched:

$ docker ps
CONTAINER ID        IMAGE                   COMMAND                  CREATED             STATUS                 PORTS                                                                                       NAMES
508045b6bf57        iotstack_nodered        "npm start -- --user…"   46 minutes ago      Up 46 minutes          0.0.0.0:1880->1880/tcp                                                                      nodered
4bde94f7e40a        pihole/pihole:latest    "/s6-init"               2 hours ago         Up 2 hours (healthy)   0.0.0.0:53->53/udp, 0.0.0.0:53->53/tcp, 0.0.0.0:67->67/udp, 443/tcp, 0.0.0.0:8089->80/tcp   pihole
c2d3aceac77a        grafana/grafana:6.3.6   "/run.sh"                2 hours ago         Up 2 hours             0.0.0.0:3000->3000/tcp                                                                      grafana
fa54039f64b0        influxdb:latest         "/entrypoint.sh infl…"   7 days ago          Up 17 hours            0.0.0.0:2003->2003/tcp, 0.0.0.0:8083->8083/tcp, 0.0.0.0:8086->8086/tcp                      influxdb
881426b293bf        eclipse-mosquitto       "/docker-entrypoint.…"   7 days ago          Up 17 hours            0.0.0.0:1883->1883/tcp, 0.0.0.0:9001->9001/tcp                                              mosquitto
ee076cb574b9        portainer/portainer     "/portainer"             7 days ago          Up 17 hours            0.0.0.0:9000->9000/tcp                                                                      portainer

I'll state for the record that this problem has persisted across a ["git pull" -> "./menu" overwriting everything -> "docker-compose up -d"] so I don't think it can be characterised as "transient".

Is the presence of this unused image expected?

Is iotstack_nodered built from nodered/node-red? That is, is it safe to remove nodered/node-red or will removing it cause iotstack_nodered to fail?

If it is safe to remove nodered/node-red then what's the best way to go about it? Just select it in Portainer and click on "Remove", or is CLI removal preferred:

$ docker rmi "nodered/node-red"

Or, is the safest course to forget about it and leave it entirely alone?

gcgarner commented 5 years ago

The unused image is a result of the Build process (Dockerfile). In order to inject the nodes from the menu I have a custom Dockerfile which builds from nodered/node-red. It creates a new image called iotstack_nodered. So technically it isnt "unused" due to the inheritance.

It would be best just to leave it as should you rebuild nodered then you will need to download this from the web again. I'm fairly certain I've tried to in the past and it refuses to remove it

Paraphraser commented 5 years ago

Noted. Thanks. A candidate for a remark in the Wiki, perhaps?

gcgarner commented 5 years ago

I've added it to the wiki. Haven't managed to find the time to investigate pihole further though