mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-04-06 00:32:12 +02:00
feat: update Dockerfile.tpl to use new OpenTelemetry Collector version and improve gomplate installation
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
FROM otel/opentelemetry-collector-contrib:0.118.0
|
||||
|
||||
|
||||
|
||||
FROM public.ecr.aws/ubuntu/ubuntu:25.04
|
||||
|
||||
ENV COLLECTOR_VERSION=0.104.0
|
||||
@@ -18,11 +22,10 @@ RUN /bin/bash -c 'set -ex && \
|
||||
curl -o /usr/local/bin/gomplate -sSL https://github.com/hairyhenderson/gomplate/releases/download/v3.11.3/gomplate_Linux-$ARCHITECTURE && \
|
||||
echo "Downloaded gomplate" && \
|
||||
chmod 755 /usr/local/bin/gomplate && \
|
||||
echo "Installed gomplate" && \
|
||||
wget "https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v${COLLECTOR_VERSION}/otelcol_${COLLECTOR_VERSION}_$(uname -s)_${ARCHITECTURE}.deb" && \
|
||||
echo "Downloaded otelcol_${COLLECTOR_VERSION}_$(uname -s)_${ARCHITECTURE}.deb" && \
|
||||
dpkg -i otelcol_${COLLECTOR_VERSION}_$(uname -s)_${ARCHITECTURE}.deb && \
|
||||
echo "Installed otelcol_${COLLECTOR_VERSION}_$(uname -s)_${ARCHITECTURE}.deb"'
|
||||
echo "Installed gomplate"'
|
||||
|
||||
# Copy Otel Colector Binary from Previous Stage
|
||||
COPY --from=0 /otelcol-contrib /usr/bin/otelcol
|
||||
|
||||
# Copy the configuration template file config.yaml.tpl
|
||||
COPY ./OTelCollector/otel-collector-config.template.yaml /etc/otel-collector-config.template.yaml
|
||||
|
||||
@@ -56,9 +56,11 @@ service:
|
||||
endpoint: {{ .Env.OPENTELEMETRY_EXPORTER_OTLP_ENDPOINT }}
|
||||
{{ if .Env.OPENTELEMETRY_EXPORTER_OTLP_HEADERS }}
|
||||
headers:
|
||||
{{- $headers := (split "," .Env.OPENTELEMETRY_EXPORTER_OTLP_HEADERS) -}}
|
||||
# Add new line
|
||||
{{ "" }}
|
||||
{{- $headers := (strings.Split "," .Env.OPENTELEMETRY_EXPORTER_OTLP_HEADERS) -}}
|
||||
{{- range $header := $headers }}
|
||||
{{- $kv := (split "=" $header) }}
|
||||
{{- $kv := (strings.Split "=" $header) }}
|
||||
{{- (index $kv 0) }}: {{ (index $kv 1) }}
|
||||
{{- end }}
|
||||
{{ end }}
|
||||
|
||||
@@ -284,8 +284,6 @@ services:
|
||||
extends:
|
||||
file: ./docker-compose.base.yml
|
||||
service: probe-1
|
||||
ports:
|
||||
- '9655:9229' # Debugging port.
|
||||
build:
|
||||
network: host
|
||||
context: .
|
||||
@@ -305,8 +303,6 @@ services:
|
||||
extends:
|
||||
file: ./docker-compose.base.yml
|
||||
service: probe-2
|
||||
ports:
|
||||
- '9656:9229' # Debugging port.
|
||||
build:
|
||||
network: host
|
||||
context: .
|
||||
|
||||
Reference in New Issue
Block a user