From 3fe8ea1f650670009ad7b35dff086b07bd074760 Mon Sep 17 00:00:00 2001 From: ItzYanick Date: Thu, 23 Mar 2023 23:07:27 +0100 Subject: [PATCH] Add Dockerfile --- Dockerfile | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..e4a2c16 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,24 @@ +ARG CHECKOUT=main + +# Go container +FROM golang:1.20.2-alpine3.17 AS GO_BUILD +ARG CHECKOUT + +RUN apk fix && \ + apk --no-cache --update add git make + +RUN mkdir /build +RUN git clone https://git.itzyanick.de/ItzYanick/runner-docker.git /build/runner \ + && cd /build/runner \ + && git checkout $CHECKOUT + +WORKDIR /build/runner + +RUN make build + +# -- +# Final Container +FROM alpine:3.17 +COPY --from=GO_BUILD /build/runner/forgejo-runner ./ + +CMD ["./forgejo-runner"] \ No newline at end of file