Michael
Michael

Reputation: 2993

How to force new wordpress docker image?

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:

  1. docker exec -it wordpress_wordpress_1 /bin/bash
  2. 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

Answers (3)

Michael
Michael

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

pacuna
pacuna

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

Shoan
Shoan

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

Related Questions