Skip to content

More opiniated base image#1

Open
indyjonesnl wants to merge 1 commit into
mainfrom
feature/opiniated-base-image
Open

More opiniated base image#1
indyjonesnl wants to merge 1 commit into
mainfrom
feature/opiniated-base-image

Conversation

@indyjonesnl
Copy link
Copy Markdown
Member

@indyjonesnl indyjonesnl commented Mar 5, 2026

The good

  • Remove composer (smaller image size, we shouldn't have/use it on production pods, prevent attack vector on package manager)
  • Provide default performance improvements out of the box:
    • realpath cache optimizations (as suggested by Symfony)
    • opcache "..."
  • Default Caddyfile out of the box
    • Currently it allows for overwriting the log level of the Caddy application itself (server logging)
    • Currently it allows for overwriting the http log level (request logging)
  • Default Google Cloud (JSON) format logging

The bad

We need to either copy Composer into the apps (defeating the point of excluding it from the base image), or mount it 'on-the-fly' using RUN --mount=type=bind,from=composer/composer:2-bin,source=/composer,target=/usr/local/bin/composer \ composer install

The ugly

Using a shared Caddyfile can introduce 1 bug into many microservices, though with this approach there would also be 1 bugfix. Duplicating a Caddyfile into >10 apps could decrease the risk of introducing a shared bug, but would also mean creating 10 fixes for 1 bug.

@indyjonesnl indyjonesnl force-pushed the feature/opiniated-base-image branch from c70f503 to 275a4d3 Compare March 5, 2026 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants