Set the same pid for service and pipeline


I need to monitor a service’s process in the pipeline, but I can’t find a way to set the pipeline step’s pid to the service one (in docker run i --pid “container:whatever”, and in docker-compose is pid: “service:myservice”).

If pid can’t be changed, how can I access the service’s processes information?