Closed PeiAlan closed 1 year ago
I have made custom modifications to the Collector and web module, and how can I build them locally afterwards
Thank you for your answer
how can I build the Collector and web module locally after making customized modifications? How can I rebuild the metric images?
I have tried building this:
docker compose -f docker-compose.yml -f docker-compose-metric.yml build pinpoint-collector
docker compose -f docker-compose.yml -f docker-compose-metric.yml build pinpoint-web
But it's not right
If you have your own collector and web jar file and used the jar file to make your own docker image by making your own Dockerfile (or modifying Dockerfiles in this project), then you also need to change images within docker-compose files as well.
yes, i have my own collector and web jar file,and i made my own docker image by modifying Dockerfiles in this project .
My collector Dockfile is :
FROM openjdk:11.0.16-jre-slim-buster
ARG PINPOINT_VERSION=${PINPOINT_VERSION:-2.5.1}
#ARG INSTALL_URL=https://github.com/pinpoint-apm/pinpoint/releases/download/v${PINPOINT_VERSION}/pinpoint-collector-boot-${PINPOINT_VERSION}.jar
RUN mkdir -p /pinpoint/config \
&& mkdir -p /pinpoint/scripts
COPY /build/config/pinpoint-collector.properties /pinpoint/config/
COPY /build/scripts/start-collector.sh /pinpoint/scripts/
COPY /build/pinpoint-collector-boot-${PINPOINT_VERSION}.jar /pinpoint/pinpoint-collector-boot.jar
RUN apt-get update && apt-get install --no-install-recommends -y curl && apt-get clean \
&& chmod a+x /pinpoint/scripts/start-collector.sh \
&& chmod a+x /pinpoint/config/pinpoint-collector.properties
ENTRYPOINT ["sh", "/pinpoint/scripts/start-collector.sh"]
My collector Dockfile-metric is :
FROM openjdk:11.0.16-jre-slim-buster
ARG PINPOINT_VERSION=${PINPOINT_VERSION:-2.5.0}
#ARG INSTALL_URL=https://github.com/pinpoint-apm/pinpoint/releases/download/v${PINPOINT_VERSION}/pinpoint-collector-starter-boot-${PINPOINT_VERSION}.jar
#ARG INSTALL_URL=https://github.com/pinpoint-apm/pinpoint/releases/download/v${PINPOINT_VERSION}/pinpoint-collector-starter-boot-${PINPOINT_VERSION}.jar
RUN mkdir -p /pinpoint/config \
&& mkdir -p /pinpoint/scripts
COPY /build/config/pinpoint-collector.properties /pinpoint/config/
COPY /build/scripts/start-collector-metric.sh /pinpoint/scripts/
# copy my own starter collector jar file
COPY /build/pinpoint-collector-starter-boot-2.5.1.jar /pinpoint/pinpoint-collector-boot.jar
RUN apt-get update && apt-get install --no-install-recommends -y curl && apt-get clean \
&& chmod a+x /pinpoint/scripts/start-collector-metric.sh \
&& chmod a+x /pinpoint/config/pinpoint-collector.properties
ENTRYPOINT ["sh", "/pinpoint/scripts/start-collector-metric.sh"]
so, next, I builded my own docker image:
docker build -f Dockerfile-metric -t pinpointdocker/pinpoint-collector:2.5.1-metric .
docker build -f Dockerfile-metric -t pinpointdocker/pinpoint-web:2.5.1-metric .
I have tried building images with this command :
docker compose -f docker-compose.yml -f docker-compose-metric.yml build pinpoint-collector
docker compose -f docker-compose.yml -f docker-compose-metric.yml build pinpoint-web
But it's not right.
so , i want to ask , how can i build my own pinpoint-collector image? thanks
May I ask what configuration needs to be enabled to solve this problem.
my telegraf logs as follow: