From 8f39a61b5a67d47afd7af7747d84a120955eebd8 Mon Sep 17 00:00:00 2001 From: Philippe Caseiro Date: Tue, 20 May 2025 13:11:46 +0200 Subject: [PATCH] fix(workflow): adding Dockerfile --- misc/docker/Dockerfile | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 misc/docker/Dockerfile diff --git a/misc/docker/Dockerfile b/misc/docker/Dockerfile new file mode 100644 index 0000000..d468f70 --- /dev/null +++ b/misc/docker/Dockerfile @@ -0,0 +1,18 @@ +# Base image +FROM golang AS builder + +# Set directory to known value +WORKDIR /app +# Define the version as a build argument +ARG GOTEMPLATE_VERSION=3.12.0 + +# Git clone the repo for gotemplate, checkout the desired tag, and build the executable +RUN git clone https://github.com/coveooss/gotemplate.git . && \ + git checkout v${GOTEMPLATE_VERSION} && \ + CGO_ENABLED=0 go build + +FROM busybox + +COPY --from=builder /app/gotemplate /gotemplate + +ENTRYPOINT [ "/gotemplate" ] \ No newline at end of file