Reputation: 2993
How do I force docker-compose to update an image?
Given the recent exploits of php (e.g. MS-ISAC ADVISORY NUMBER: 2018-101), I want to update my docker-compose wordpress.
I tried:
docker-compose down && docker-compose build --pull && docker-compose up -d
When I check the version of php though, it lists 7.2.9
rather than 7.2.10
I check it by:
docker exec -it wordpress_wordpress_1 /bin/bash
php -v
I believe that it should list 7.2.10
because when i go to wordpress on docker hub and follow the link for latest, I see that it lists php:7.2-apache
, and when I check php on docker hub for 7.2-apache
, the Dockerfile lists 7.2.10
(see: L116)
Upvotes: 0
Views: 853
Reputation: 2993
It turns out that even though the changes were merged, dockerhub was still showing that the most recent update was before the merge. (so dockerhub wasn't up to date yet)
https://github.com/docker-library/php#see-a-change-merged-here-that-doesnt-show-up-on-docker-hub-yet
Upvotes: 0
Reputation: 2089
Instead of using latest, use the latest tag released. That would force compose to use that version of the image. Or you could also use the --no-cache flag when running docker-compose build to download the image again.
Upvotes: 1
Reputation: 4078
It depends on whether the wordpress image available in docker hub was rebuilt since php was updated.
Your best bet is to rebuild the wordpress image yourself, instead of pulling it from wordpress using wordpress' dockerfile.
Upvotes: 1