Skip to content

Commit 8170ce5

Browse files
authored
try pulling in pre built binaries (#321)
1 parent 4b6fe92 commit 8170ce5

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

cmd/otelcontribcol/Dockerfile

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -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-
81
FROM alpine:latest as prep
92
RUN apk --update add ca-certificates
103

@@ -15,8 +8,11 @@ FROM scratch
158
ARG USER_UID=10001
169
USER ${USER_UID}
1710

11+
ARG TARGETOS
12+
ARG TARGETARCH
13+
1814
COPY --from=prep /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
19-
COPY --from=build /otelcontribcol /otelcontribcol
15+
COPY ../../bin/otelcontribcol_${TARGETOS}_${TARGETARCH} /otelcontribcol
2016
EXPOSE 4317 55680 55679
2117
ENTRYPOINT ["/otelcontribcol"]
2218
CMD ["--config", "/etc/otel/config.yaml"]

0 commit comments

Comments
 (0)