We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4b6fe92 commit 8170ce5Copy full SHA for 8170ce5
cmd/otelcontribcol/Dockerfile
@@ -1,10 +1,3 @@
1
-FROM golang:1.20 AS build
2
-
3
-WORKDIR /src
4
-ADD . /src
5
6
-RUN cd cmd/otelcontribcol && CGO_ENABLED=0 go build -o /otelcontribcol
7
8
FROM alpine:latest as prep
9
RUN apk --update add ca-certificates
10
@@ -15,8 +8,11 @@ FROM scratch
15
ARG USER_UID=10001
16
USER ${USER_UID}
17
11
+ARG TARGETOS
12
+ARG TARGETARCH
13
+
18
14
COPY --from=prep /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
19
-COPY --from=build /otelcontribcol /otelcontribcol
+COPY ../../bin/otelcontribcol_${TARGETOS}_${TARGETARCH} /otelcontribcol
20
EXPOSE 4317 55680 55679
21
ENTRYPOINT ["/otelcontribcol"]
22
CMD ["--config", "/etc/otel/config.yaml"]
0 commit comments