portainer: Unable to retrieve image details or access container console after update of Docker to v26
EDIT FOR TLDR (April 5, 2024)
Portainer 2.20.1 has now been released, which includes a fix for these issues under Docker 26. We recommend updating to 2.20.1 if you need to use Docker 26.
Original report
Before you start please confirm the following.
- Yes, I’ve searched similar issues on GitHub.
- Yes, I’ve checked whether this issue is covered in the Portainer documentation or knowledge base.
Problem Description
Inability to see image information and to use container consoles.
Expected Behavior
Image info is accessible and container consoles are functional
Actual Behavior
Clicking on an image causes the error message “Error Unable to retrieve image details” and clicking on container consoles also produce this same error.
Steps to Reproduce
- SSH into host server
- apt update && apt upgrade
- (Update updates docker-ce alongside any dependencies)
Portainer logs or screenshots
No response
Portainer version
2.19.4
Portainer Edition
Community Edition (CE)
Platform and Version
Docker 5:26.0.0-1~ubuntu.20.04~focal
OS and Architecture
Ubuntu 22.04
Browser
No response
What command did you use to deploy Portainer?
docker run -d -p 8000:8000 -p 9443:9443 --name portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:latest
Additional Information
Info seen online for this issue states to execute the following for recreating the portainer container:
docker run -d -p 8000:8000 -p 9443:9443 --name portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock portainer/portainer-ce:latest
This does not work, and the issue persists even after a reinstall of Ubuntu and reinstall of docker/portainer.
Only feasible fix is to rollback docker-ce version.
About this issue
- Original URL
- State: closed
- Created 3 months ago
- Reactions: 58
- Comments: 121 (10 by maintainers)
This is indeed an issue with Docker 26 compatibility - this version removed some functionality we rely on to display the image details. As Docker 26 has only just come out we were unable to test against it for any past releases, but I am discussing with the team as to our next steps.
Same here, it may be related to Docker Swarm 26.0.0
The most recent version of the 2.19 branch (2.19.4) was released in December, prior to the Docker 25 release that contained the deprecation notice for this functionality. As such it was not tested against Docker 25 or Docker 26 as neither was released at the time.
We’re currently working on a fix for this issue which we intend to roll out in our next patch release.
Same issue when I click to access the console.
Looking a bit at the issue, it seems to be that it’s due to the deprecated “Container and ContainerConfig fields in Image inspect” which got removed in v26: https://github.com/docker/cli/blob/v26.0.0/docs/deprecated.md#container-and-containerconfig-fields-in-image-inspect
This feature was already deprecated in Docker v25 (Released in January) and was due for removal for v26. A fix is also provided in the documentation. Somebody dropped the ball here.
Same here when accessing console for any container in Portainer BE
Debian Bookworm here… no console access. Seems like the image update indicator (red/green) is also affected, as all containers are “green”… very unusual. To work around I did this (borrowing from ubuntu above):
Same issue here,
until issue solved or new version of docker to try.
Docker provides instructions for installing specific versions - these are the instructions for Ubuntu (select the Specific version tab in step 2) but there are other installation processes available for other distros. 25.0.5 is the most recent version in the version 25 release. For example, on a Ubuntu 20.04 server:
To identify the version strings available on your particular Ubuntu version, you can use:
Pick the most recent non-Docker 26 version string and proceed from there.
Note also that if you perform an
apt upgrade
after downgrading Docker like this, it will upgrade back to the latest version again. To prevent this you can pin Docker to the version you’re running to prevent this from happening. As a superuser, create a file named/etc/apt/preferences.d/docker
with the following content (replace the version string with yours):If you’re running ubuntu 22.04, then set the version as follows. VERSION_STRING=5:25.0.5-1~ubuntu.22.04~jammy
Rolling back makes console etc available again.
Commenting to help others and to get visibility to quickly fix this issue.
For Ubuntu 20.04 Focal Fossa use this command to fix the issue by downgrading docker
VERSION_STRING=5:25.0.5-1~ubuntu.20.04~focal sudo apt install docker-ce=$VERSION_STRING docker-ce-cli=$VERSION_STRING docker-ce-rootless-extras=$VERSION_STRING containerd.io docker-buildx-plugin docker-compose-plugin
As others have suggested commenting out docker from the sources.list until there’s a fix may be a good idea since any time you run an apt update or apt-get update this will update docker again.
Alternatively you can set a hold on the packages by running “sudo apt-mark hold docker-ce docker-ce-cli docker-ce-rootless-extras containerd.io docker-buildx-plugin docker-compose-plugin”
To undo the hold run “sudo apt-mark unhold docker-ce docker-ce-cli docker-ce-rootless-extras containerd.io docker-buildx-plugin docker-compose-plugin”
I have AlmaLinux 8 as my OS. The instructions for downgrading are in the Specific version tab at https://docs.docker.com/engine/install/centos/
So I did it like this:
Then my Portainer Business Edition 2.19.4 the exec console started working again.
2.20 is based off 2.19.4 and was also not built with Docker 26 support (2.20.0 was released just before Docker 26 was).
@jeremyjohn Portainer has been updated no need to downgrade anymore just pull and update portainer (make sure to use the
sts
tag)Portainer 2.20.1 has now been released, which includes a fix for these issues under Docker 26. We recommend updating to 2.20.1 if you need to use Docker 26.
same here: debian 12 fresh install Docker version 26.0.0, build 2ae903e Portainer Business Edition 2.19.4
I also spot that when I click on the image sha link in the images list page, it refreshes a bit and returns to the same list page. I’m still using Debian 10 in my old server. Base on the info above, I revert to docker-ce v25 and confirm it works now.
sudo apt install docker-ce=5:25.0.5-1~debian.10~buster
For ubuntu 22.04, the correct version should be VERSION_STRING=5:25.0.5-1~ubuntu.22.04~jammy
@jamescarppe
I tried again, but unfortunately with the following new version of Docker 26.0.2, the problem remains. Also, is still present the dangerous bug , that an image with container “stopped” state is shown as “unused”
We are very far from a definitive solution, I hope it won’t be long until the next LTS. In the meantime I was forced downgrade to Docker 25.0.5 and the latest LTS of Portainer 2.19.4
Upgrading Portainer to image
portainer/portainer-ce:sts
works on Raspberry Pi 5 arm64 Debian Bookworm. Thank you devs.As an alternative there is dockge: https://github.com/louislam/dockge
This one was unaffected by the docker upgrade. If you are having issues with rollback, check this out.
for those like myself who don’t know, for ubuntu and debian style systems this will allow all other upgrades to happen except the docker upgrade
apt-mark hold docker-ce*
I also was having DNS issues. Downgrading Docker to 25 fixed images issue but DNS one persisted. Rolled back to Docker 24 - and DNS started to work without a hassle
Armbian (Debian)
apt install --allow-downgrades docker-ce=5:24.0.9-1~debian.12~bookworm
for ubuntu 23.10 the command below works:
Here as well.
EDIT: saw your response now @jamescarppe, thank you.
A force refresh using <kbd>Ctrl + R</kbd> worked for me
Previously downgraded Docker to 25.0.5 to make it work with Portainer. Somehow Docker got updated to 26.0.1 at some point, and ran into the issue again with portainer-ce:latest. Restarted with portainer-ce:sts which pulled 2.20.1, but it did not work. Updating Docker to 26.0.2 solved it.
This is another repeated cycle of unintentional Docker updates with OS updates. #10983 I would recommend :
to cancel the hold:
apt-mark unhold docker-ce*
until Portainer predicts what’s docker is up to next. https://www.portainer.io/blog/portainer-and-docker-26
Downgrading the docker version worked for now
Ubuntu 22.04:
@jamescarppe There is a bug in version 20.01 of portainer. An image is marked as “unused” when the container has been “exited” 😦
With previous versions of Portainer, if the container was “exited” the image was unused. With version 20.01 am I set container in “paused” to see its unused image?
Is this the correct behavior? Thanks PC
You will need to use the version-specific
:2.20.1
tag or the:sts
meta tag, as the 2.20 branch is a STS (Short-Term Support) release and as such is not referenced by the:latest
tag. You can find more information about what this means in our 2.20 release blog post .Thank you
Please read here https://www.portainer.io/blog/portainer-and-docker-26
We’ve just pushed out a MOTD update (which you’ll see in-app when you next log in) which links to our new blog post on the topic. We’ll be updating the blog post (and this thread) as the fix proceeds.
Thanks man!!! Worked!!!
What others are you considering?
on raspberry with official OS
Having the same, also my IPVLAN network in docker doesn’t resolve names anymore, so no internet access for my dockers since the update. Updated 2 machines with OMV-Portainer, same problem with both of them instantly after the update.
big thanks, it works!
sudo apt install --allow-downgrades docker-ce=5:25.0.5-1~debian.12~bookworm
This one did the job for my version of debian:
Same issue here!
The same problem for Debian 12 - another one also when uploading Portaine with
docker stack deploy -c portainer.yaml portaine
message: (Since --detach=false was not specified, tasks will be created in the background. In a future release, --detach=false will become the default.) I worked around it with:docker stack deploy --detach=false -c portainer.yaml portainer
@mamama1 For business you need to switch to Short-Term Support (STS) branch. - https://www.portainer.io/blog/portainer-2.20-release
Switch to portainer/portainer-ee:sts from latest in your docker compose or pull
what about business edition? it says 2.19.5 is the latest version and I’m still having this issue. thanks
I have portainer 2.20.1 and Docker 26.1.0, until further notice it runs ok.
We have seen some users still experiencing the issue after updating to 2.20.1 that have resolved the issue through clearing their browser cache and/or doing a force refresh of the page. Those that are still seeing it, are you able to try this (or try in a different browser)?
Still had that issue on portainer 2.20.1 with docker 26.0.0
Updating docker to 26.0.1 fixed that issue.
As the problem referred to in this issue has been resolved with the release of 2.20.1, I am closing the issue. Other problems should be raised in separate tickets where appropriate.
I personally confirmed console access was fixed so you should be good to go. Try clearing your browser cache, or perhaps the image your container uses doesn’t support consoling in.
@jamescarppe Thank you for the blog post and especially for the in-app banner notification about it. You saved us a lot of time and effort. https://www.portainer.io/blog/portainer-and-docker-26
From the Portainer itself :
So, we have to wait until 2.20.1 for the resolution.
Same happening for me on Ubuntu 22.04, Docker 26.0. Fix from @gsanchez2004 worked.
For anyone getting issues: Checking the OS version first.
Then, said fix.
And expected output:
Restarted the Portainer container and I am able to access my container’s shell now.
Same error here too… just when it’s time to update everything… I’d rather wait for an update to fix it than to revert a version, I hope it arrives quickly
For now I have downgraded to docker 25.0.5 by apt removing and auto cleaning docker. Then using dockers install script with the —version tag. Then commenting out docker from its sources.list.d until there’s a fix