Sebastian Vîrlan Sebastian Vîrlan -4 years ago 78
Linux Question

Multiple services to run on a container or multiple containers Docker?

I have a container with a Laravel application that is used for development.

So I don't use an apache image, only a php 5.6 one. The process that keeps the container alive from not stopping is

php artisan serve --host=

and this is also the command that start start the Laravel application server.
The application folder is mounted locally on my computer.

For my project I also need to run in my app root folder:

gulp watch
php artisan run:command
php artisan command:runServer 8282

So where and how can I run those commands? Should I create container for each command?

Answer Source

there is no definite answer, you can run several process in a container, using supervisor

or s6

or any other process manager (,

You can have several containers working together

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download