帮助手册

在 Docker 中安装 S247DataExporter 和 PHP agent(同一容器)

请按照以下步骤在 Docker 容器中安装 S247DataExporter 和 PHP agent:

  1. Dockerfile 中添加带有安装参数的 PHP agent 安装命令。
  2. Dockerfile 中添加带有安装参数的 S247DataExporter 安装命令。
  3. entrypoint 脚本启动 S247DataExporter。

Dockerfile 示例

FROM php:7.4-fpm-bullseye
#
#Your code
#
#Prerequisite (ignore if already installed)
RUN apt-get update && apt-get install -y wget unzip procps
#installing the PHP agent
RUN wget -O InstallAgentPHP.sh https://staticdownloads.site24x7.com/apminsight/agents/AgentPHP/linux/InstallAgentPHP.sh
RUN sh InstallAgentPHP.sh -lk "licensekey" -zpa.application_name "PHP-Application"
#installing the S247DataExporter (This is mandatory for the PHP agent to work)
RUN wget -O InstallDataExporter.sh https://staticdownloads.site24x7.com/apminsight/S247DataExporter/linux/InstallDataExporter.sh
RUN sh InstallDataExporter.sh -root -nsvc -lk "licensekey"
#Entrypoint script
COPY ./example-entrypoint.sh /example-entrypoint.sh
ENTRYPOINT [ "sh","/example-entrypoint.sh" ]

入口脚本示例

#!/bin/sh
#Start S247DataExporter
sh /opt/S247DataExporter/bin/service.sh start
#
#Your code
#
php-fpm

如何在 Docker 容器中安装各种 APM Insight agent
Java | .NET | Node.js | Python

如何在 Kubernetes 环境中安装各种 APM Insight agent
Java | .NET | PHP | Node.js | Python

本文档对您有帮助吗?

您愿意帮助我们改进文档吗?请告诉我们哪些方面可以做得更好。


很抱歉本文档未能让您满意。我们希望了解可以从哪些方面改进您的体验。


感谢您抽出时间分享反馈。我们将利用您的反馈来改进在线帮助资源。

短链接已复制!