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.

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

  1. SSH into host server
  2. apt update && apt upgrade
  3. (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)

Most upvoted comments

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):

VERSION_STRING=5:25.0.5-1~debian.12~bookworm
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
''' 

Same issue here,

  1. Downgraded on Ubuntu 22.04 jammy to docker 25.0.5 by running :
VERSION_STRING=5:25.0.5-1~ubuntu.22.04~jammy
sudo apt-get install docker-ce=$VERSION_STRING docker-ce-cli=$VERSION_STRING containerd.io docker-buildx-plugin docker-compose-plugin
  1. Commented from /etc/apt/sources.list.d/docker.list the “deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu jammy stable” line

until issue solved or new version of docker to try.

and how do I revert the docker version? If not, how do I install a more stable version?

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:

VERSION_STRING=5:25.0.5-1~ubuntu.20.04~focal
sudo apt-get install docker-ce=$VERSION_STRING docker-ce-cli=$VERSION_STRING containerd.io docker-buildx-plugin docker-compose-plugin

To identify the version strings available on your particular Ubuntu version, you can use:

apt-cache madison docker-ce | awk '{ print $3 }'

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):

Package: docker-ce*
Pin: version 5:25.0.5-1~ubuntu.22.04~jammy
Pin-Priority: 999

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:

  dnf -y install docker-ce-25.0.5-1.el8 docker-ce-cli-25.0.5-1.el8

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”

Client: Docker Engine - Community
 Version:           26.0.2
 API version:       1.45
 Go version:        go1.21.9
 Git commit:        3c863ff
 Built:             Thu Apr 18 16:27:45 2024
 OS/Arch:           linux/arm64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          26.0.2
  API version:      1.45 (minimum version 1.24)
  Go version:       go1.21.9
  Git commit:       7cef0d9
  Built:            Thu Apr 18 16:27:45 2024
  OS/Arch:          linux/arm64
  Experimental:     false
 containerd:
  Version:          1.6.31
  GitCommit:        e377cd56a71523140ca6ae87e30244719194a521
 runc:
  Version:          1.1.12
  GitCommit:        v1.1.12-0-g51d5e94
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

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*

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.

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:

VERSION_STRING=5:25.0.5-1~ubuntu.23.10~mantic
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

Here as well.

  • Swarm 26.0.0
  • portainer/agent:2.19.4
  • portainer/portainer-ee:2.19.4

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 :

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*

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:

VERSION_STRING=5:25.0.5-1~ubuntu.22.04~jammy
sudo apt-get install docker-ce=$VERSION_STRING docker-ce-cli=$VERSION_STRING containerd.io docker-buildx-plugin docker-compose-plugin

@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

@jamescarppe I tried pulling the portainer/portainer-ce latest image but I get nothing from the docker registry. My latest version remains 2.19.4 😦 Thanks

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 .

Hi guys, I don’t understand if we should expect a fix from Docker or Portainer. Thanks in advance PC

Please read here https://www.portainer.io/blog/portainer-and-docker-26

Thank you

Hi guys, I don’t understand if we should expect a fix from Docker or Portainer. Thanks in advance PC

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.

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.

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

Thanks man!!! Worked!!!

so portainer is no longer compatible with docker.

Portainer seems to have some issues with the last docker version, so i think until the issue is solved, at least in my case, i can deal with use of the previous version. If its not solved soon i will have to look for another docker manager to replace Portainer.

What others are you considering?

on raspberry with official OS

VERSION_STRING=5:25.0.5-1~debian.12~bookworm
apt-get install docker-ce=$VERSION_STRING docker-ce-cli=$VERSION_STRING containerd.io docker-buildx-plugin docker-compose-plugin

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.

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

This one did the job for my version of debian:

sudo apt install --allow-downgrades docker-ce=5:25.0.5-1~debian.11~bullseye

big thanks, it works! sudo apt install --allow-downgrades docker-ce=5:25.0.5-1~debian.12~bookworm

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

This one did the job for my version of debian:

sudo apt install --allow-downgrades docker-ce=5:25.0.5-1~debian.11~bullseye

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

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)?

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 did so and got it updated. However, still can’t connect to the console. Inspect, however, now works again.

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

This issue return upon version 2.20.0

From the Portainer itself :

Latest News From Portainer We are aware of compatibility issues with all versions of Portainer and Docker 26. Our team is working on fixes for the issues, with a 2.20.1 patch in testing, and we recommend against updating to Docker 26 at this time. You can find out more in our blog post Portainer and Docker 26.

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.

$ cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.4 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.4 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy

Then, said fix.

$ VERSION_STRING=5:25.0.5-1~ubuntu.22.04~jammy
$ sudo apt-get install docker-ce=$VERSION_STRING docker-ce-cli=$VERSION_STRING containerd.io docker-buildx-plugin docker-compose-plugin

And expected output:

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
containerd.io is already the newest version (1.6.28-2).
docker-buildx-plugin is already the newest version (0.13.1-1~ubuntu.22.04~jammy).
docker-compose-plugin is already the newest version (2.25.0-1~ubuntu.22.04~jammy).
Suggested packages:
  cgroupfs-mount | cgroup-lite
The following packages will be DOWNGRADED:
  docker-ce docker-ce-cli
0 upgraded, 0 newly installed, 2 downgraded, 0 to remove and 2 not upgraded.
Need to get 27.3 MB of archives.
After this operation, 3411 kB disk space will be freed.
Do you want to continue? [Y/n] Y
Get:1 https://download.docker.com/linux/ubuntu jammy/stable arm64 docker-ce-cli arm64 5:25.0.5-1~ubuntu.22.04~jammy [12.4 MB]
Get:2 https://download.docker.com/linux/ubuntu jammy/stable arm64 docker-ce arm64 5:25.0.5-1~ubuntu.22.04~jammy [14.9 MB]
Fetched 27.3 MB in 3s (9362 kB/s)
dpkg: warning: downgrading docker-ce-cli from 5:26.0.0-1~ubuntu.22.04~jammy to 5:25.0.5-1~ubuntu.22.04~jammy
(Reading database ... 121309 files and directories currently installed.)
Preparing to unpack .../docker-ce-cli_5%3a25.0.5-1~ubuntu.22.04~jammy_arm64.deb ...
Unpacking docker-ce-cli (5:25.0.5-1~ubuntu.22.04~jammy) over (5:26.0.0-1~ubuntu.22.04~jammy) ...
dpkg: warning: downgrading docker-ce from 5:26.0.0-1~ubuntu.22.04~jammy to 5:25.0.5-1~ubuntu.22.04~jammy
Preparing to unpack .../docker-ce_5%3a25.0.5-1~ubuntu.22.04~jammy_arm64.deb ...
Unpacking docker-ce (5:25.0.5-1~ubuntu.22.04~jammy) over (5:26.0.0-1~ubuntu.22.04~jammy) ...
Setting up docker-ce-cli (5:25.0.5-1~ubuntu.22.04~jammy) ...
Setting up docker-ce (5:25.0.5-1~ubuntu.22.04~jammy) ...
Processing triggers for man-db (2.10.2-1) ...
Scanning processes...
Scanning processor microcode...
Scanning linux images...

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