From fed1478bcb5528722e67ce99f05441b6f3ce91fb Mon Sep 17 00:00:00 2001 From: "Nico Aymet (nikuzz)" Date: Wed, 21 May 2025 18:15:22 +0100 Subject: [PATCH] Update Dockerfile.tpl When otel-collector runs with runAsNonRoot: true and a specific runAsUser UID, gomplate can't write to /etc. Change the output path to /tmp to avoid permission issues --- OTelCollector/Dockerfile.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OTelCollector/Dockerfile.tpl b/OTelCollector/Dockerfile.tpl index 38f1afb022..f7ab1d72a4 100644 --- a/OTelCollector/Dockerfile.tpl +++ b/OTelCollector/Dockerfile.tpl @@ -32,4 +32,4 @@ COPY ./OTelCollector/otel-collector-config.template.yaml /etc/otel-collector-con # In command, gomplate the configuration file to replace the environment variables otel-collector-config.yaml and run the collector -CMD gomplate -f /etc/otel-collector-config.template.yaml > /etc/otel-collector-config.yaml && echo "Here is the generated config file: " && cat /etc/otel-collector-config.yaml && otelcol --config /etc/otel-collector-config.yaml +CMD gomplate -f /etc/otel-collector-config.template.yaml > /tmp/otel-collector-config.yaml && echo "Here is the generated config file: " && cat /tmp/otel-collector-config.yaml && otelcol --config /tmp/otel-collector-config.yaml