Skip to content

Commit

Permalink
try pulling in pre built binaries (#321)
Browse files Browse the repository at this point in the history
  • Loading branch information
tommyzli authored May 6, 2024
1 parent 4b6fe92 commit 8170ce5
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions cmd/otelcontribcol/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
FROM golang:1.20 AS build

WORKDIR /src
ADD . /src

RUN cd cmd/otelcontribcol && CGO_ENABLED=0 go build -o /otelcontribcol

FROM alpine:latest as prep
RUN apk --update add ca-certificates

Expand All @@ -15,8 +8,11 @@ FROM scratch
ARG USER_UID=10001
USER ${USER_UID}

ARG TARGETOS
ARG TARGETARCH

COPY --from=prep /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY --from=build /otelcontribcol /otelcontribcol
COPY ../../bin/otelcontribcol_${TARGETOS}_${TARGETARCH} /otelcontribcol
EXPOSE 4317 55680 55679
ENTRYPOINT ["/otelcontribcol"]
CMD ["--config", "/etc/otel/config.yaml"]

0 comments on commit 8170ce5

Please sign in to comment.