Docker multi serivces in a single container

Viewed 49

is it a good practice to create one dockerfile with all needed container , ex :

1 - FROM ubutnu

2 - RUN apt install php7.4

3 - RUN apt install mysql-server

4 - RUN apt install nginx

5 - RUN apt install openssh-server
......
2 Answers

the service you are looking for is kubernetes and called pod and/or deployment.

You can put nginx/php in two separate container into the same pod and the mysql-server in another pod.

Related