1) Getting nginx extension/apmia and nginx in the same container.
we are not recommending to run apmia as part of nginx container, as when nginx server pods scale up APMIA needs to run in each pod. But yes we will support.
2) When APMIA runs in different container or pod
nginx probe supports below two environment parameters for APMIA hostname and port to update in docker environment . nginx.conf needs to be updated with these parameters, refer attached sample nginx file.
These env parameters can be overridden in docker-compose.yml or can also be passed while starting the nginx docker image as below.
ex: docker run -e COLLECTOR_AGENT_HOST=lvndev004220.bpc.broadcom.net -e COLLECTOR_AGENT_PORT=5005 -p 80:8888 -d 94768cdb3336
Please refer below docops link for nginx yml file and environment parameters.