Those screen shots are from the same time?
What version of portainer are you using?
Do you have old images that you have not cleared or do you really have 31 different images?
When you were doing docker image pulls, did you ever purge the unused images after update?
The dashboard shows you have 26 containers running and one stopped; but under container view it shows 4 running (so your right that something does not look right).
You might have to refresh portainer; but first look at your images.
Those unused containers images, for the most part, are your add-ons.
I personally don’t use any add-ons via home-assistant.
You ‘should’ be good in removing your unused containers (as long as you verify that add-on is otherwise working). I would only do one at a time since it might take several minutes to remove an image (usually only a few seconds but can take longer).
Well, what worries me in removing them is that the images are marked as unused, but why are they unused, the containers are running, so they should use the images, right?
Unused means that they are not used by a container. If you look at your images from the screenshot for example there are 6 images for the google drive backup add-on, but only the last one is not unused, this is the one that the container uses currently, the others are old versions of the image (you can see the tag with the old version numbers).
As far as I know portainer will not let you delete a image that is used by a container, at least in the command line you are not able to delete images used by containers (running or stopped).
Its a container which you downloa, this can be multiple version. This way usually you will only used 1 container instead of multiple. Furthermore sometime you can also remove the container from run status and remove it. so the images remain on your server until you delete the images
Don’t get a heart attack please!
I can see you struggle, but don’t worry, I’m using docker elsewhere, so I can decipher most of it, I’ve just never used portainer, and don’t understand the view it shows.
But it’s good pointing it out, I do the same normally, use the right words for the stuff, and know what acronyms mean, before you use them
That is true, and I’ve removed those. But the others don’t have a used and unused image, so that is a bit confusing.
Also that doesn’t bring me nearer to being able to open a console inside a container which was my original intent.
EDIT:
Ok, I get an error when it’s in use:
Weird that it is shown as unused.
Go to the container list, click on the container in the column ‘name’, this brings you to the container details page. There is a section at the top called “Container status” and at the bottom of this section is a button “>_Console”, click on it and then you are able to execute the commands to login to the shell.
# list running containers
docker container ls
# list all containers
docker container ls -a
# list images
docker image ls
# list all images
docker image ls -a
# similar to container ls but sometimes different results
docker ps
doker ps -a
Something funky is going on.
Compare the CLI outputs to what you get in Portainer.
I run ‘most’ of the above commands on an hourly basis (slightly modified) via cron job to get passed into HA for binary sensors for checking on available updates. I don’t use things like watchtower any more due to breaking changes. I want to be physically at my machine to recover from any problems.