我阅读了AWS X-RAY和AWS Elastic Beanstalk文档,想知道为什么他们说X-RAY守护进程应该作为扩展运行。据我所知,Elastic Beanstalk可以将我的应用程序作为docker容器运行。我能在容器内运行守护进程吗?
文档:
这里他们说我们应该运行X-RAY守护进程作为扩展:https://docs.aws.amazon.com/xray/latest/devguide/xray-daemon-beanstalk.html
下面展示了如何在Docker中运行守护进程:https://docs.aws.amazon.com/xray/latest/devguide/xray-daemon-local.html
您应该编辑您的dockerFile,使其具有x射线守护进程
FROM amazonlinux
RUN yum install -y unzip
RUN curl -o daemon.zip https://s3.us-east-2.amazonaws.com/aws-xray-assets.us-east-2/xray-daemon/aws-xray-daemon-linux-3.x.zip
RUN unzip daemon.zip && cp xray /usr/bin/xray
ENTRYPOINT ["/usr/bin/xray", "-t", "0.0.0.0:2000", "-b", "0.0.0.0:2000"]
EXPOSE 2000/udp
EXPOSE 2000/tcp