parent
f59798df65
commit
325cf611de
1 changed files with 2 additions and 7 deletions
|
|
@ -3,24 +3,19 @@ ARG CHECKOUT=main
|
||||||
# Go container
|
# Go container
|
||||||
FROM golang:1.20.2-alpine3.17 AS GO_BUILD
|
FROM golang:1.20.2-alpine3.17 AS GO_BUILD
|
||||||
ARG CHECKOUT
|
ARG CHECKOUT
|
||||||
|
|
||||||
RUN apk fix && \
|
RUN apk fix && \
|
||||||
apk --no-cache --update add git make
|
apk --no-cache --update add git make
|
||||||
|
|
||||||
RUN mkdir /build
|
RUN mkdir /build
|
||||||
RUN git clone https://code.forgejo.org/forgejo/runner.git /build/runner \
|
RUN git clone https://code.forgejo.org/forgejo/runner.git /build/runner \
|
||||||
&& cd /build/runner \
|
&& cd /build/runner \
|
||||||
&& git checkout $CHECKOUT
|
&& git checkout $CHECKOUT
|
||||||
|
|
||||||
WORKDIR /build/runner
|
WORKDIR /build/runner
|
||||||
|
|
||||||
RUN make build
|
RUN make build
|
||||||
|
|
||||||
# --
|
# --
|
||||||
# Final Container
|
# Final Container
|
||||||
FROM alpine:3.17
|
FROM alpine:3.17
|
||||||
COPY --from=GO_BUILD /build/runner/forgejo-runner /app
|
RUN mkdir /app
|
||||||
|
COPY --from=GO_BUILD /build/runner/forgejo-runner /app/forgejo-runner
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
CMD ["./forgejo-runner", "daemon"]
|
CMD ["./forgejo-runner", "daemon"]
|
||||||
Loading…
Reference in a new issue