Docker: Add a new target for generic language versions
You can use the Docker Makefile to create dockerfiles for specific language environments, e.g
$ make build-python3.12 VERSIONS_python=3.12
However this breaks when trying to do something like
$ make build-php8.3.0RC6 VERSIONS_php=8.3.0RC6 VARIANT_php=cli
This breaks due to the RC in the version, due to how we're trying to parse out the module name from the version string, we strip out anything that is a 0-9 or a . or -.
That works for 'python3.12' leaving 'python'. However for 'php8.3.0RC6' that leaves 'phpRC'.
After spending some time on this, the best (and simplest) solution I could come up with, that doesn't break existing usage, is to create a new make target for this.
So the above now becomes
$ make gen-php8.3.0RC6 MODULE=php VERSIONS_php=8.3.0RC6 VARIANT_php=cli
The new target is gen-
It does seem to work fine - however I'm reluctant to that change since it's a mess from users' POV: why would I choose to use make gen- targets instead of make build- ones?
It does seem to work fine - however I'm reluctant to that change since it's a mess from users' POV: why would I choose to use
make gen-targets instead ofmake build-ones?
Because of the problem it addresses...
You can use the Docker Makefile to create dockerfiles for specific language environments, e.g
$ make build-python3.12 VERSIONS_python=3.12
However this breaks when trying to do something like
$ make build-php8.3.0RC6 VERSIONS_php=8.3.0RC6 VARIANT_php=cli
This breaks due to the RC in the version, due to how we're trying to parse out the module name from the version string, we strip out anything that is a 0-9 or a . or -.
That works for 'python3.12' leaving 'python'. However for 'php8.3.0RC6' that leaves 'phpRC'.
After spending some time on this, the best (and simplest) solution I could come up with, that doesn't break existing usage, is to create a new make target for this.
So the above now becomes
$ make gen-php8.3.0RC6 MODULE=php VERSIONS_php=8.3.0RC6 VARIANT_php=cli
The new target is gen- and you need to specify the language module.
Sure, but I mean it would be a mess to document and from user POV it's kinda weird to have two ways of doing the same thing.
(I don't have a good solution in hand though)