I have went through the Monitor dockerized APP with AppMon and learnt there are 2 approach to do so.
i just want to add the DTAgent in docker container and feel the Inheritance approach is feasible for this as I don't want server and collector. And Composition will install all server, collector etc in docker container which i do not want.
Please confirm my understanding and suggest the suitable approach.
Dynatrace Collector and server don't have to work in docker environment. The only what you need to provide is network communication between docker containers and collector that will collect recorded metrics and purepaths.
Yes i know that.
My application migrating to dockerized container from VM application. in that case i want to embed the Dynatrace Agent by default in docker container and for that which approach is better that i want to understand . Hope, now the question is clear.
I don't understand your issue. You've asked about adding agent to container which is ok, as second aproach you were asking about installing collector and server in docker container. This second idea is wrong what I've mentioned.
This solution is recommended in general.