Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Check if volume contains older version of WordPress and update it #272
I am pretty new to docker as well as wordpress so please forgive me if this is a dumb question.
If I understand correctly the update will happen when the container is run NOT built. If I have dev/staging/production deploys won't this mean I have moving scripts when I go to run in each environment? I think I understand having the init this way since it is dependent upon a database to create base tables. But if I have an existing site, I feel like I would just want to run a docker build, include my site, and have it update at that time. Then I can deploy the same static image everywhere I want? Thanks! :)
Also either way this seems like a great addition!
Wordpress docker includes the code for a given version of Wordpress and this code is deployed to a volume on the first run of that docker image.
What this patch does is to check at startup if the version of Wordpress contained in the image is newer then the version installed in the volume. If so it will upgrade Wordpress.
I think we are many people that find it surprising when you upgrade the docker image and the Wordpress version is not upgraded... That's what this patch is trying to fix.
Thanks for the reply!
I'm surprised people are mounting the wordpress code itself. Is there an advantage for doing it this way? Why not just run the code version in the container you are pulling? Then you only need to mount and maintain the uploads folder?
Thanks for your insight on this, I am trying to develop a strategy for my own wordpress sites. My initial approach is to have the docker image contain my wp-content and just use the wordpress code in the image. Then I only mount the uploads folder. So everything is contained in the image. Seems updating would be as easy as doing a new build. It doesn't seem like people are doing it this way though.
Sorry for the long delay.
I'm inclined to share my opinion from #156 (comment) here -- namely, I don't really see a compelling reason for us to implement this any more (and thus believe we should simply remove this old
I've included in #156 (comment) notes for anyone who wants to disable the WordPress auto-update functionality (which is now possible trivially thanks to #142) and instead control WordPress versioning strictly with Docker image updates.