michaelmcandrew / civicrm-buildkit-docker

This is a read only copy. Please make PRs here: https://lab.civicrm.org/michaelmcandrew/civicrm-buildkit-docker
https://lab.civicrm.org/michaelmcandrew/civicrm-buildkit-docker
GNU Affero General Public License v3.0
40 stars 31 forks source link

Does not build with jessie image #32

Closed mattwire closed 5 years ago

mattwire commented 5 years ago

No longer builds from Jessie image as jessie-updates repo does not seem to be available anymore. Replacing with FROM php:7.1-apache-stretch seems to work fine in the dockerfile

michaelmcandrew commented 5 years ago

thanks for noticing @mattwire! In fact I think it is better to not specify the Debian version at all, as per https://github.com/michaelmcandrew/civicrm-buildkit-docker/commit/826585f4ef920d4e81d869f22b784d13fbd32d4b. Will release a new version based on this at some point soon.

wmortada commented 5 years ago

I'm using the latest version and still had an issue building the image. I think this may be due to docker caching php:7.1-apache as php:7.1-apache-jessie. I think docker-compose build --no-cache should probably fix this.

wmortada commented 5 years ago

No, that doesn't work it still seems to be pulling the jessie image which doesn't build. Specifying FROM php:7.1-apache-stretch as @mattwire suggests works for me though.

wmortada commented 5 years ago

Should we move to PHP 7.2 in any case?

michaelmcandrew commented 5 years ago

7.1-apache == 7.1-apache-stretch according to https://hub.docker.com/_/php so I assume that there must be some local caching in play @wmortada.

michaelmcandrew commented 5 years ago

Should we move to PHP 7.2 in any case?

See https://github.com/michaelmcandrew/civicrm-buildkit-docker/issues/36

wmortada commented 5 years ago

Yes, it probably is caching, but I couldn't work out how to get round this.

michaelmcandrew commented 5 years ago

On my machine the 7.1-apache-jessie and 7.1-apache tags point to different image ids. I am guessing on yours they point to the same.

michael@hazel ~ docker image ls | grep 7.1-apache                                                                                                                                                                                                                     Wed 10 Apr 11:02:33
php                                       7.1-apache-jessie   b82d8ec4bd3d        4 weeks ago         390MB
php                                       7.1-apache          7def689e1352        2 months ago        369MB

You should be able to remove the 7.1-apache image with something like docker image rm php:7.1-apache and then get it again with docker pull php:7.1-apache.

And thinking about it, maybe just docker pull php:7.1-apache is enough to update to the latest image id.

wmortada commented 5 years ago

Yes, running docker pull sorted it out.

They didn't point to the same image, but they were both outdated. Running docker pull php:7.1-apache and docker pull php:7.1-apache-stretch updated both images so that they have the same hash.

Thanks!

michaelmcandrew commented 5 years ago

Thanks for the report back - good to know.