How to run two CMD commands in a Docker file?


I have a docker file where I need to start 2 servers once the container is started.

The 2 servers are Messenger & a Management Server.

The Messenger has to start first & when it is up & running , only then can I start the Management Server.

The Messenger takes about a minute to start & then I would start the Management server.

How do I use the CMD or the ENTRYPOINT directive to achieve this.

**Both the servers are in 1 container.

A container is meant to run a single process, so you should probably use 2 containers. Why do you want to put them in one container?