Reputation: 5538
I want to start nginx and cron as root user and php-fpm as 1001 user. How can I do that? I thought I must create an entrypoint script where I use su-exec and start nginx and cron as root and set CMD in docker compose that starts php-fpm and also set user 1001 via docker compose.
Upvotes: 0
Views: 1007
Reputation:
the solution for this is not to use ENTRYPOINT and CMD to run each service, but to have a script which runs both services, and use that as the entrypoint.
Upvotes: 1
Reputation: 1954
to achieve that there is a bash script within Docker documentation in this link:
otherwise, I recommend you to run each service within his own container.
Upvotes: 1