-
Notifications
You must be signed in to change notification settings - Fork 8
/
Dockerfile
37 lines (25 loc) · 1021 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
FROM golang:1.19.1 as builder
RUN mkdir /build
WORKDIR /build
# Default tag is demo
ARG TAG=local-dev
RUN GO111MODULE=on go install go.opentelemetry.io/collector/cmd/builder@v0.69.1
ADD . .
# Substitute TAG into config file as version
RUN sed -i -e "s/\${TAG}/$TAG/g" /build/config/builder-config.yml
RUN builder --config /build/config/builder-config.yml
FROM debian:stable-slim
RUN apt-get update \
&& apt-get install -y --no-install-recommends ca-certificates
RUN update-ca-certificates
RUN mkdir -p /etc/otel
WORKDIR /otel
COPY --from=builder /build/build/telemetry-generator .
COPY --from=builder /build/config/collector-config.yml /etc/otel/config.yaml
COPY --from=builder /build/examples/* /otel/examples/
ENV TOPO_FILE=/otel/examples/hipster_shop.yaml
ENV OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=ingest.lightstep.com:443
ENV OTEL_EXPORTER_OTLP_TRACES_ENDPOINT_INTERNAL=ingest.lightstep.com:443
ENV OTEL_INSECURE=false
ENTRYPOINT [ "./telemetry-generator" ]
CMD [ "--config", "/etc/otel/config.yaml" ]