How to upgrade Dockerfile base images

Hi guys
Please how to upgrade (pull locally is any updates) all the base images (FROM) within the Dockerfile without manually reading/parsing it and invoking docker pul manually-resolved-image.

The most close seems to use docker build --no-cache. Still it looks really to update meta for the image but the image it self is till cached

#1 [internal] load build definition from Dockerfile.webui
#1 transferring dockerfile: 166B done
#1 DONE 0.0s

#2 [internal] load metadata for ghcr.io/some/base-image:main
#2 DONE 0.0s

#3 [internal] load .dockerignore
#3 transferring context: 2B done
#3 DONE 0.0s

#4 [1/2] FROM ghcr.io/some/base-image:main
#4 CACHED

Maybe this means there were no updates to the image yet docker images says the image is 2 months ago old. I doubt it could really be that rotten.

So how to pull all the base images from the Dockerfile explicitly or while the docker build invocation.

Thank you.

I’ve pulled image manually and I can confirm the image was really outdated and fetched with the updated version. So how actually to force pull on the build stage.

Have you tried docker build --pull --no-cache ?

Oh looks like this is exactly what I need
Instead of CACHED it trying to resolve the image

#4 [1/2] FROM ghcr.io/some/base-imagei:main@sha256: d93273d8bd5e990f3845555a6ef410f7684583b4336f59227614378a0db8f044
#4 resolve ghcr.io/some/base-imagei:main@sha256:d93273d8bd5e990f3845555a6ef410f7684583b4336f59227614378a0db8f044 done
#4 DONE 0.1s

Yet currently as I’ve pulled the updates manually it sticks to the very same revision. So I’ll double check in a while once the image has more updates.

Thank you very much!

Yes. This really works :+1: