2024-06-22 14:27:54 +00:00
|
|
|
FROM golang:1.22 as builder
|
|
|
|
|
2024-06-25 10:01:50 +00:00
|
|
|
WORKDIR /drone-gitea-release
|
2024-06-22 14:27:54 +00:00
|
|
|
|
|
|
|
COPY go.mod go.sum ./
|
|
|
|
RUN go mod download
|
|
|
|
|
|
|
|
COPY . .
|
2024-06-25 10:01:50 +00:00
|
|
|
RUN CGO_ENABLED=0 go build -o drone-gitea-release
|
2024-06-22 14:27:54 +00:00
|
|
|
|
|
|
|
FROM alpine:3.6 as alpine
|
|
|
|
RUN apk add -U --no-cache ca-certificates
|
|
|
|
|
|
|
|
FROM alpine:3.6
|
|
|
|
ENV GODEBUG netdns=go
|
|
|
|
|
|
|
|
COPY --from=alpine /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
|
|
|
|
|
2024-06-25 14:05:44 +00:00
|
|
|
RUN apk add --no-cache git
|
|
|
|
|
2024-06-25 10:01:50 +00:00
|
|
|
COPY --from=builder /drone-gitea-release/drone-gitea-release /bin/
|
|
|
|
ENTRYPOINT ["/bin/drone-gitea-release"]
|