Updating Wordpress Container

Hi,

I am having a question regarding the official wordpress docker container and the update procedure.

If I look at my current container, I am running Wordpress 5.5.3 and in the wordpress dashboard I get the notification that I should update to the latest version which is 5.6.

So I wrote myself a small script which shuts down the current container, pulls the new image and runs the latest docker image. Once I have done that, I still see that I am on Version 5.5.3 and not 5.6 what the latest image should be.

Is that normal behavior or am I doing something wrong?

Please share the content of your script.

The script includes the following 3 commands:

`docker-compose down

docker pull wordpress:latest

docker-compose up`

I assume you use wordpress:latest. The latest tag is a typical mutable tag: even though the name is stable, whenever the tag is updated will point to an updated image digest (=the checksum of the changed image).

Even though your approach pulls and updates the image underneath the mutable tag, re-creates a new container based on the new image, it does not necessarily mean that the latest tag reflects the most recent version of the software.

Does that make sense?

Yes, I am using wordpress:latest as mentioned in my second message.
It does make sense what you are saying, I just don’t know how to fix that.

First of all production and latest tag do not play well together. Instead use a specific tag version in your compose.yml. Whenever you change the tag, and do a docker-compose up -d, the container will be re-created based on the changed image.