Problem/Motivation
As a part of the migration to base our containers off the official we loose the ability to have the containers have a unified base container. This means each dockerfile needs to install dependencies that are universal for DrupalCI.
A good example are the SQL clients or PhantomJS.
Proposed resolution
A shell script can be written to add all the universal packages we need. This can be added via the dockerfile ADD command.
http://docs.docker.com/engine/reference/builder/#add
We can then use the dockerfile RUN command to execute it.
Since Database containers are different from Web containers, it would make sense to write one for each. Placing it in the respective parent folders (e.g. containers/database, containers/web).
Comments
Comment #2
MixologicComment #3
elachlan CreditAttribution: elachlan commentedMoved to DrupalCI Environments.
Comment #4
MixologicSince many of these dockerfiles are going to have shared components with little different between them, It would be good to explore using m4 and make to generate the dockerfiles so we have much less copy paste risks when making changes.
http://bobbynorton.com/posts/includes-in-dockerfiles-with-m4-and-make/
Comment #5
MixologicOr failure to copy/paste as in the case with composer.
Comment #6
MixologicThis is now done for the php containers. There's an bash script that executes a lot of m4 templates to generate all of the php Dockerfiles and associated artifacts.