Add Dockerfile
This commit is contained in:
parent
97ecd0e52d
commit
3fe8ea1f65
1 changed files with 24 additions and 0 deletions
24
Dockerfile
Normal file
24
Dockerfile
Normal file
|
|
@ -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"]
|
||||||
Loading…
Reference in a new issue