woodpecker/docker/Dockerfile.cli.alpine.multiarch
Lauris BH 46452fbd84
Update Go dependencies and minimal Go version to 1.20 (#1650)
Signed-off-by: 6543 <6543@obermui.de>
Co-authored-by: 6543 <6543@obermui.de>
2023-03-21 00:48:15 +01:00

17 lines
428 B
Docker

FROM --platform=$BUILDPLATFORM golang:1.20 AS build
WORKDIR /src
COPY . .
ARG TARGETOS TARGETARCH
RUN --mount=type=cache,target=/root/.cache/go-build \
--mount=type=cache,target=/go/pkg \
make build-cli
FROM alpine:3.16
RUN apk add -U --no-cache ca-certificates
ENV GODEBUG=netdns=go
COPY --from=build /src/dist/woodpecker-cli /bin/
HEALTHCHECK CMD ["/bin/woodpecker-cli", "ping"]
ENTRYPOINT ["/bin/woodpecker-cli"]