From fb239e32039c8cc4c4807abdb4426c40b0baf613 Mon Sep 17 00:00:00 2001 From: wetneb Date: Sun, 13 Aug 2023 12:20:56 +0000 Subject: [PATCH] [FORGEJO] run the Docker entrypoint via tini --- Dockerfile | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 49cf77b..bd931fa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,15 +1,16 @@ -#Build stage -FROM golang:1.21-alpine3.18 AS build-env - -RUN apk --no-cache add build-base git +FROM golang:1.21-alpine3.18 as builder +# Do not remove `git` here, it is required for getting runner version when executing `make build` +RUN apk add --no-cache make git COPY . /srv WORKDIR /srv -RUN make build + +RUN make clean && make build FROM alpine:3.18 -LABEL maintainer="contact@forgejo.org" +RUN apk add --no-cache git bash tini -COPY --from=build-env /srv/forgejo-runner /bin/forgejo-runner +COPY --from=builder /srv/forgejo-runner /bin/forgejo-runner +COPY scripts/run.sh /opt/act/run.sh -ENTRYPOINT ["/bin/forgejo-runner"] +ENTRYPOINT ["/sbin/tini","--","/opt/act/run.sh"]