Replies: 3 comments
-
Your answer lies in the If you want the image to automatically update the system in place, I typically delete |
Beta Was this translation helpful? Give feedback.
-
Hi @maiorano84 , thanks for your reply.
Is deleting those files somewhere documented that this is a correct way of updating wordpress ? Regards |
Beta Was this translation helpful? Give feedback.
-
No, that's just how the image works under the hood. It's just that if you're expecting the image itself to upgrade an existing installation through the use of a changed image version, the only way the current entrypoint script will do it is if certain files don't exist at runtime. The "correct" way depends on what environment you're working in, and whether you're mounting your entire installation as a volume. In most local installs, the entire WP instance is mounted, so the "correct" method would be to upgrade through the usual avenues in the Admin panel. Deleting the target files and restarting works - and is arguably faster - but it relies on very specific behaviors from the image itself that falls outside of the usual upgrade process. When using this image as a final build step for Staging / Production, I will leave out these files in my own build to force the upgrade through the entrypoint. This way, we're keeping the Wordpress Core stateless and whatever orchestrator we use (in our case, EKS) can continue to reliably replicate and restart our containers in a repeatable manner. This way, the Wordpress version is now maintained as a part of the image build which would be considered the "correct" method for anybody with a reasonable DevOps and CI/CD setup. Is it worth mentioning in the docs? Eh, maybe. I don't have a strong opinion about it, I'm just a user. But I never have a problem with maintainers providing more information than less. |
Beta Was this translation helpful? Give feedback.
-
Hello,
![image](https://private-user-images.githubusercontent.com/3259618/280725388-b0a8a61a-a50b-48b7-8bc5-e5e1524916b9.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ3MDQ2NjcsIm5iZiI6MTcyNDcwNDM2NywicGF0aCI6Ii8zMjU5NjE4LzI4MDcyNTM4OC1iMGE4YTYxYS1hNTBiLTQ4YjctOGJjNS1lNWUxNTI0OTE2YjkucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDgyNiUy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CZyZXBvX2lkPTAifQ.PEqJKo5o1eCnCWjhbSVsNIBlLANbxpk9Qeecmzu34Ao)
![image](https://private-user-images.githubusercontent.com/3259618/280729174-fc3e1fdb-aa28-4324-b564-341219ebea5c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ3MDQ2NjcsIm5iZiI6MTcyNDcwNDM2NywicGF0aCI6Ii8zMjU5NjE4LzI4MDcyOTE3NC1mYzNlMWZkYi1hYTI4LTQzMjQtYjU2NC0zNDEyMTllYmVhNWMucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDgyNiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA4MjZUMjAzMjQ3WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZDEwMzQyMzU4NTM1MjE3OWY2OTM1MmJkNTRmNzZhN2U1NGM5NDk2YTUzYjgyYzliYmZmOTQ1ZjM5ZDAyMThmMSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.bQSobnGDGfaR9mEfZJXRoN8pDen5QkP49j0TJm0023o)
![image](https://private-user-images.githubusercontent.com/3259618/280725753-906bdad4-6e02-443a-9b35-1874724459c5.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ3MDQ2NjcsIm5iZiI6MTcyNDcwND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Ftei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NTM0NDI5MTViNTEzNzk0MjQzNzg4MjFjMTRhNmY4NDU3YzE1YjRjN2RmYzQxMzNmNGU1YzIxNGI0NTM2MTg3MCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.GCS9AWgH3hKHQqhs2rS0GsJGD6WGTZjPH5Mw3iYykkY)
![image](https://private-user-images.githubusercontent.com/3259618/280726129-0395087c-0c25-45dd-9a57-ad0a64b905c9.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ3MDQ2NjcsIm5iZiI6MTcyNDcwNDM2NywicGF0aCI6Ii8zMjU5NjE4LzI4MDcyNjEyOS0wMzk1MDg3Yy0wYzI1LTQ1ZGQtOWE1Ny1hZDBhNjRiOTA1YzkucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDgyNiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA4MjZUMjAzMjQ3WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MDFkODA5ODM0ODkwMDVmM2E2YTk3ZGQ4MjQzN2YyZmRhZDdhOGU0NjY0MDJiNzY2MjdlYTAzNTg4MDM4ZDcxMSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.xK56NMQsdbuyZ4Mo9DXSt7qS4eSPWxVQrD-9jzCRDeg)
when I use wordpress 6.1
for a local test environment
and then update my Dockerfile to wordpress version 6.3.1
build my local docker image again
and check if docker has itself updated after stopping, deleting and starting my docker container then
I'm still seeing the version 6.1. Expected would be to see version 6.3.1 which is not the case.
When I verify that I used correct docker Image with version 6.3.1 for my container that has been started with "docker history"
I can see that in that image version 6.3.1 is being used.
Currently I'm using a docker-compose.yml with a local volume that mounts to /var/www/html
When I check what the content of the file version.php from the html/wp-includes folder is I see
that this file has not been updated by the docker container that is based on wordpress version 6.3.1.
I would like to know how to properly update the wordpress version by using docker ?
Beta Was this translation helpful? Give feedback.
All reactions