need your PHP code, it's better to add all these programs to one image. And than only change program to run. Apache: FROM php:7-apache (this can be default service) Cron: RUN apt-get instal cron (to run, override command to cron -f ) PHP CLI: already in Apache image (to run, override command to php some-script.php ) 27