From 9fa26b7837ed8e6679b7e6115425cab6ecbc9a8a Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 20 Oct 2024 22:50:50 +0200 Subject: Adding upstream version 3.5.1. Signed-off-by: Daniel Baumann --- Dockerfile | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 Dockerfile (limited to 'Dockerfile') diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..50f1965 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,47 @@ +FROM --platform=$BUILDPLATFORM code.forgejo.org/oci/tonistiigi/xx AS xx + +FROM --platform=$BUILDPLATFORM code.forgejo.org/oci/golang:1.21-alpine3.19 as build-env + +# +# Transparently cross compile for the target platform +# +COPY --from=xx / / +ARG TARGETPLATFORM +RUN apk --no-cache add clang lld +RUN xx-apk --no-cache add gcc musl-dev +RUN xx-go --wrap + +# Do not remove `git` here, it is required for getting runner version when executing `make build` +RUN apk add --no-cache build-base git + +COPY . /srv +WORKDIR /srv + +RUN make clean && make build + +FROM code.forgejo.org/oci/alpine:3.19 +ARG RELEASE_VERSION +RUN apk add --no-cache git bash + +COPY --from=build-env /srv/forgejo-runner /bin/forgejo-runner + +LABEL maintainer="contact@forgejo.org" \ + org.opencontainers.image.authors="Forgejo" \ + org.opencontainers.image.url="https://forgejo.org" \ + org.opencontainers.image.documentation="https://forgejo.org/docs/latest/admin/actions/#forgejo-runner" \ + org.opencontainers.image.source="https://code.forgejo.org/forgejo/runner" \ + org.opencontainers.image.version="${RELEASE_VERSION}" \ + org.opencontainers.image.vendor="Forgejo" \ + org.opencontainers.image.licenses="MIT" \ + org.opencontainers.image.title="Forgejo Runner" \ + org.opencontainers.image.description="A runner for Forgejo Actions." + +ENV HOME=/data + +USER 1000:1000 + +WORKDIR /data + +VOLUME ["/data"] + +CMD ["/bin/forgejo-runner"] -- cgit v1.2.3