[
https://issues.apache.org/jira/browse/SOLR-15335?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Chris M. Hostetter updated SOLR-15335:
--------------------------------------
Attachment: SOLR-15335.patch
Status: Open (was: Open)
Attaching a work in progress patch - uses "header" files per Dockerfile type,
concatenated with a common "body" file.
* the Dockerfile.local produced currently works correctly and can be tested
* the Dockerfile.official _looks_ ok, but still needs work in terms of
ensuring we have the correct variables to populate when we build it.
this approach currently uses the gradle build in {{expand()}} support for using
SimpleTemplateEngine to do the variable replacement – which is nice because it
also let's use use {{<% /* comments */ %>}} in the templates which get striped
out of the final Dockerfile ... but it's kind of a pain to deal with because
all literal '$' characters and '\'+'\n' pairs need to be escaped in order to be
preserved.
As i mention in a comment...
{code:java}
// nocommit: instead of using 'expand(...)' and the groovy SimpleTemplateEngine
// nocommit: we should consider a more "scaled down" home-made templating system
// nocommit: that would let us avoid needing to escape every '$' character in
the templates
//
// nocommit: if we really only need "variables" in our FROM and ARG lines then
maybe we can
// nocommit: go back to something like what was in SOLR-15250 (with special
'FROM' support)
// nocommit: and added support for "template commends" (maybe '##' gets
stripped out) ?
{code}
NOTE: the logic in "official" header this patch comes straight from
docker-solr, just re-aranged a bit ... I have not yet attempted any substantive
changes to any of the logic being used in the "official" header like i was
talking about in SOLR-15250 (ie: using KEYS files, etc..) ... just left TODOs
to explore them later in their own issues.
> templated (header + body) approach for building Dockerfile.local +
> Dockerfile.official w/common guts
> ----------------------------------------------------------------------------------------------------
>
> Key: SOLR-15335
> URL: https://issues.apache.org/jira/browse/SOLR-15335
> Project: Solr
> Issue Type: Sub-task
> Reporter: Chris M. Hostetter
> Assignee: Chris M. Hostetter
> Priority: Major
> Attachments: SOLR-15335.patch
>
>
> Goals:
> * "generate" a Dockerfile.official at release time that will satisfy the
> process/tooling of docker-library for 'official' docker images
> ** use a templated approach to fill in things like version, sha512, and GPG
> fingerprint
> * ensure that the generated Dockerfile.official and the Dockerfile.local
> included in solr.tgz are identical in terms of the "operational" aspects of a
> Solr docker image (ie: what the disk layout looks like, and how it runs)
> ** they should only differ in how they get the contents of a solr.tgz into
> the docker image (and how much they trust it before unpacking it)
> * minimize the amount of overhead needed to make changes that exist in in
> both dockerfiles
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]