yous / pinpoint-docker

Docker for Pinpoint
https://hub.docker.com/r/yous/pinpoint/
MIT License
37 stars 12 forks source link

How can I set "profiler.collector.ip" right while building images #5

Open DevotedTangLiu opened 7 years ago

DevotedTangLiu commented 7 years ago

I am trying to build an docker images, which include my application container, besides, the pinpoint agent. But I'm not sure where I would run the collector, how can I config "profiler.collector.ip", makes that agent works everywhere, like, I only need to edit the docker-compose file , no need to enter the running application container and set that value.

Thanks.

yous commented 7 years ago

Hi, sorry for the late response. Currently I don't think there is a way to configure profiler.collector.ip easily... But if you have some commands to run, you can use alternate Dockerfile:

FROM yous/pinpoint:1.6.0

RUN <command>

and set docker-compose.yml to use that Dockerfile:

build:
  context: .
  dockerfile: Dockerfile-alternate

If you still have problems with this, then you may have to build images directly from pinpoint repository. They provides example docker-compose.yml, and this file was created with this commit. Following to these, you can set COLLECTOR_IP environment of pinpoint-agent.

yous commented 7 years ago

Also this post (Chinese) tells how to build pinpoint images. I think pinpoint-agent will be built in similar way.