全链路监控工具pinpoint 部署带pinpoint agent的product服务
[root@master product-service-biz]# ls pinpoint/
boot pinpoint-bootstrap-1.8.5.jar pinpoint-real-env-lowoverhead-sample.config script
lib pinpoint.config plugin tools
[root@master product-service-biz]# cat Dockerfile
FROM java:8-jdk-alpine
RUN apk add -U tzdata && \
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
COPY ./target/product-service-biz.jar ./
COPY pinpoint /pinpoint
EXPOSE 8010
CMD java -jar -javaagent:/pinpoint/pinpoint-bootstrap-1.8.5.jar -Dpinpoint.agentId=${HOSTNAME} -Dpinpoint.applicationName=ms-product /product-service-biz.jar
#这里将pinpoint目录拷贝到镜像里面,然后运行pinpoint
-javaagent:${pinpointPath}/pinpoint-bootstrap-1.8.5.jar
-Dpinpoint.applicationName=
-Dpinpoint.agentId=
[root@master product-service-biz]# docker build -t reg.harbor.com/microservice/product:pinpoint .
Sending build context to Docker daemon 64.95MB
Step 1/6 : FROM java:8-jdk-alpine
---> 3fd9dd82815c
Step 2/6 : RUN apk add -U tzdata && ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
---> Using cache
---> 3d79cdf17999
Step 3/6 : COPY ./target/product-service-biz.jar ./
---> af45498b45de
Step 4/6 : COPY pinpoint /pinpoint
---> 9166a2db306f
Step 5/6 : EXPOSE 8010
---> Running in 721fae4464e4
Removing intermediate container 721fae4464e4
---> d445675f095d
Step 6/6 : CMD java -jar -javaagent:/pinpoint/pinpoint-bootstrap-1.8.5.jar -Dpinpoint.agentId=${HOSTNAME} -Dpinpoint.applicationName=ms-product /product-service-biz.jar
---> Running in 69a68d80f663
Removing intermediate container 69a68d80f663
---> e370e7c58cdb
Successfully built e370e7c58cdb
Successfully tagged reg.harbor.com/microservice/product:pinpoint
[root@master product-service-biz]# docker push reg.harbor.com/microservice/product:pinpoint
The push refers to repository [reg.harbor.com/microservice/product]
c1c1892a5a99: Pushed
a7eb54fcd329: Pushed
1a6781d58798: Layer already exists
a1e7033f082e: Layer already exists
78075328e0da: Layer already exists
9f8566ee5135: Layer already exists
pinpoint: digest: sha256:0646f5e16a1f80ba6b66090cc48a3774389d2072c8b456e5848c412888c46e88 size: 1582
目录 返回
首页