Portainer News and Blog

"Pull latest image" feature in CE

Written by Neil Cresswell, CEO | September 16, 2022

Over the last week there has been a fair amount of discussion online around a feature in Portainer: the "Pull latest image" functionality.

This feature appears as a toggle in the Portainer UI when recreating a container or service, and when enabled Portainer will check with the upstream registry and ensure that the latest version of the image and tag used before performing the recreate.

In version 2.12 of the Business Edition of Portainer, we added similar "pull latest image" functionality to the recreation of stacks (as per this Github issue - in which we mention that the feature is BE-only).

In the next Community Edition (2.13) we added the display of this toggle as an advertisement for the BE-only feature, but the feature itself was disabled.  When adding this advertising toggle, we inadvertently had the toggle displaying in the incorrect state - on - when the feature itself was actually off.

In version 2.15 of Portainer CE, as part of the UI refresh, we fixed this incorrect display of the toggle to show the correct state of the feature - off. This change has caused some concern in the community that the feature was removed from the CE version of Portainer to make it a BE-only feature.

In this situation, the confusion was exacerbated by the way that Docker itself works. When recreating a container, Docker will use the latest version of the image and tag that it has locally. This could result, under certain circumstances, in stack updates appearing to pull the latest images from the upstream registry when in fact they were not. For example, if you had deployed a stack that used the nginx:latest image, then later on deployed another container using the same image (but the image upstream had updated in the meantime) and opted to pull the latest image when doing so, Docker would have an updated version of the nginx:latest image available locally, but your first stack would not be using it. When you updated the stack, Docker would recognize that you had a local version of the image that was more up to date than the one you were using, and would automatically use that version instead.

At this point I would like to make it clear: we have no plans what so ever to remove features  from the Community Edition in order to make it a Business Edition exclusive feature. Doing so goes against the founding principles of Portainer and our love for open source, where Portainer was born.

The open source nature of our Community Edition means you can in fact at any point look back through our code to confirm that we have never done this.

We made a mistake here in how we displayed the toggle's true state in CE 2.13, and we're sorry that this happened and that we didn't fix this sooner. Our intent was never to deceive our users or give the appearance that we removed a feature from CE. In the future we will be ensuring that any and all toggle states as well as any other advertisements of BE-specific features in CE will accurately reflect the status of the option or feature.

This incident has caused us to do some real thinking about this feature in particular and where it should fit within our product offerings, especially considering the way that Docker itself acts and the availability of the feature for containers and services. In addition, reusing tags is actally seen as an anti-pattern and risky in production deployments (it really is a feature useful in the development phase only).

As a result, in 2.15.1 we have decided to make the "pull latest image" feature for stacks available in both CE and BE, permanently.

We hope this summary has shed some light on the events that led to where we are today. If you have any questions on what happened that haven't been answered here, please get in touch.

Neil