要将外部数值传递给Apama Docker容器中的config.evt文件,您可以使用Docker环境变量来实现。以下是一个示例解决方法:
event-config
{
myParameter=<>;
}
FROM apama-correlator:10.7
COPY config.evt.template /apama-project/
ENV MY_PARAMETER default_value
CMD envsubst < /apama-project/config.evt.template > /apama-project/config.evt && correlator --config /apama-project/config.evt
docker build -t apama-container .
docker run -e MY_PARAMETER=123 apama-container
在运行容器时,Docker会将环境变量传递给容器内部,并使用envsubst命令将config.evt.template中的<
请注意,这只是一个简单的示例,您可能需要根据您的具体要求进行修改。此外,确保在Docker镜像中包含所需的Apama安装和配置文件。