I recently stumbled over https://github.com/just-containers/s6-overlay. It’s not precisely the micro service philosophy at it’s purest expression, but there is one thing I pretty much like about it:
Background:
I spend (still) an (unnecessary) lot of time in mental deadlock on how to structure different init scripts and entry points in a correct way. Usually this involves
Scripting the container commands, mean:CMD
Dealing with environment variables & secrets
Dealing with configuration
Sometimes: Dealing with ownership & permissions (however I recently discovered git update-index --chmod=+x)
Executing the actual service
Idea
It would be nice if there would be an “official way” of doing it in the form of a .tar which would be ADD-ed directly from a remote git repository and could be used by setting the ENTRYPOINT to /init. Be it a single binary or a set of sh files, I thing it would help consolidate thoughts on structure about this problem spend around the globe.
HOW you ‘init’ your application in the container is up to you and the demands of the application
I think in turn there is a pattern to it, so to rephrase (hypothetically):
What genuine steps you usually undertake and concepts you apply to init your container can be of broader interests, if your patterns are useful, clearly structured and well documented.
This idea (not precisely an issue) is about convergence and brain share.
Or in more technical terms: standardizing repeatable patterns and workflows.
I’ve acquired a notion of some recurring tasks when scripting containers… Don’t you have an instance of a situation where you where also thinking: “Ok, now fix permissions”, “now application init”, “then run commands” or how should I best structure it again?
PS: I don’t claim it’s a exceptionally good idea. But I think it has it’s niche.