wodby/php

Make a image based on cli-alpine for script containers

Closed this issue · 3 comments

Kwadz commented

I saw we use the same image containing a web server (PHP-FPM) that is useless in case of containers that are just used for scripts, for example here: crond. We might even need a lot of them especially in a micro-service architecture.

The difference of size is pretty big:

  • 528MB for php:7.4-fpm-alpine
  • 75MB for php:7.4-cli-alpine

What about creating a image based on cli-alpine for everything that don't require a web server?

Kwadz commented

Closing as apparently the containers reuse the same image without extra space.

Kwadz commented

I forgot a detail in my last statement. Since we need to override wodby/php with a new Dockerfile, a new image of at least 528MB will be created again. Therefore a cli-alpine seems be the best option for running script containers.

Kwadz commented

Closing as there no need to override wodby/php. Overriding CMD in docker-compose should be enough.