I am completely new to docker and i am not a developer. Right now i have an application which runs on centos/nginx/dotnetcore
. In dotnet core
i have 4 applications, we run them using dotnet appname.dll
. or rather systemd
. If i want to dockerize this application set, should i create centos
as a separate docker image and then nginx
as other image and then an image for each of the application ? If yes how do i link them, or should i create only one image with centos/nginx and all 4 applications (which is in tar) installed? Any help on this would be appreciated.
2
Answers
nginx and dotnet as 2 seperate containers for each application would be ideal and recomended
Check the dockerfile below about the ASP.NET rest API. It is the same way when you call dotnet appname.dll. Instead of running in Centos it runs in container which is debian based if I’m not wrong
If you have 4 dependent applications you can use docker-compose.
Above docker-compose.yml given. It contains 3 service which are frondend, backend and database. In your docker-compose.yml you should define your 4 application