phpearth / docker-php

🐳 Docker For PHP developers - Docker images with PHP, Nginx, OpenLiteSpeed, Apache, Lighttpd, and Alpine
https://docs.php.earth/docker
MIT License
261 stars 80 forks source link

apache, nginx, litespeed, cgi short tags #10

Open adaliszk opened 6 years ago

adaliszk commented 6 years ago

So using the lattest is very convenient and I would like to not specify the php version for apache, nginx, litespeed and cgi versions so I could roll my applications with the stable php version. If something goes wrong with and upgrade the tests will fail, so we could upgrade the necessary parts whenever it's needed to keep the code up to date.

petk commented 6 years ago

Docker tags on one particular Docker image have only a single latest tag. Currently this might seem a bit confusing to newcomers: phpearth - a vendor or username on Docker Hub php - a repository on Docker Hub 7.1-nginx - tag name

Which all go into phpearth/php:7.1-nginx...

The latest is currently set to phpearth/php:7.1 which includes only PHP CLI sapi and some of those additional PHP extensions that seem to be most used.

With using multiple latest ones, we would need to set multiple repositories on Docker Hub - not a good approach with the current state of this repository. So phpearth/7.1 phpearth/7.2 etc would mean multiple repositories on Docker Hub. Besides confusion, also maintaining multiple php repos on Docker Hub is something I would like to avoid in this phase.

Bare in mind that migrating to the latest stable PHP version is best done within a particular PHP branch a - therefore those prefixes 7.1, 7.2 etc. Migrating to a next version like for example latest (from 7.1 to 7.2) is something that should be done slightly more carefully and tripple checked in your code. There are many backward incompatibilities done on each branch from time to time. PHP 7.2 will have some deprecations...

Do you have any better system in mind here?

adaliszk commented 6 years ago

Maybe not better but it would be nice to able to just swtich the core php library (https://hub.docker.com/_/php/) with your image adding the phpearth/ to the front.

What you suggesting is interesting, but images can have multiple tags, so I would work with that instead multiple repositories. You can for example add the latest to the 7.1. That should be one or two lines in the build process intead migrating the whole repository to smaller ones.

What I would do if I wanted to split it to multiple repositories that keep the main repo and add the subrepositories as modules.