Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Run multiple scripts in docker image

Hi i am wondering if it possible to run two scripts in same time automaticly on docker container start . First script have to run client application, and the second run server app as background.

like image 203
ProgShiled Avatar asked Oct 20 '25 04:10

ProgShiled


1 Answers

You can use CMD in your Dockerfile and use command & to run two command in parallel:

CMD server_command & client_command

(where server_command is the command used to start the server and client_command is the command used to start the client)

like image 58
Itai Steinherz Avatar answered Oct 22 '25 18:10

Itai Steinherz



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!