From a949bc7801aeb6182d2a56533c92a2393eaab534 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charles-Andr=C3=A9=20Flamand?= Date: Mon, 25 Mar 2024 16:21:54 -0400 Subject: [PATCH] Use golang image to use go install for easy multi arch support (#1) --- .gitignore | 1 + Dockerfile | 23 +++++++++++------------ 2 files changed, 12 insertions(+), 12 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9f11b75 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.idea/ diff --git a/Dockerfile b/Dockerfile index a562860..b127836 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,17 +1,16 @@ -FROM alpine:3 +FROM golang:alpine3.19 RUN apk add --no-cache \ - curl + git -RUN mkdir -p /opt/buildevents +RUN git clone \ + --depth 1 \ + --branch "v0.16.0" \ + https://github.com/honeycombio/buildevents /opt/buildevents \ + && cd /opt/buildevents \ + && go install github.com/honeycombio/buildevents/ -WORKDIR /opt/buildevents - -# Install buildevents -RUN curl -L \ - -o buildevents \ - https://github.com/honeycombio/buildevents/releases/download/v0.16.0/buildevents-linux-amd64 \ - && chmod 755 buildevents - -CMD ["/opt/buildevents/buildevents", "--help"] +RUN apk del \ + git +ENTRYPOINT ["buildevents"]