2024-09-05 11:53:05 +02:00
|
|
|
FROM --platform=$BUILDPLATFORM docker.io/golang:1.23 AS certs
|
2021-10-04 17:09:22 +02:00
|
|
|
|
|
|
|
FROM scratch
|
2022-03-01 17:40:24 +02:00
|
|
|
ARG TARGETOS TARGETARCH
|
2021-10-04 17:09:22 +02:00
|
|
|
ENV GODEBUG=netdns=go
|
2024-02-26 21:12:41 +02:00
|
|
|
# Internal setting do NOT change! Signals that woodpecker is running inside a container
|
|
|
|
ENV WOODPECKER_IN_CONTAINER=true
|
2021-10-28 21:02:43 +02:00
|
|
|
ENV XDG_CACHE_HOME=/var/lib/woodpecker
|
2022-09-04 03:24:42 +02:00
|
|
|
ENV XDG_DATA_HOME=/var/lib/woodpecker
|
2022-03-01 17:40:24 +02:00
|
|
|
EXPOSE 8000 9000 80 443
|
2021-10-04 17:09:22 +02:00
|
|
|
|
2023-03-21 01:48:15 +02:00
|
|
|
# copy certs from certs image
|
2022-03-01 17:40:24 +02:00
|
|
|
COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
|
|
|
|
# copy server binary
|
2023-12-29 21:30:20 +02:00
|
|
|
COPY dist/server/${TARGETOS}_${TARGETARCH}/woodpecker-server /bin/
|
2021-10-04 17:09:22 +02:00
|
|
|
|
2023-07-25 15:55:29 +02:00
|
|
|
HEALTHCHECK CMD ["/bin/woodpecker-server", "ping"]
|
2021-10-04 17:09:22 +02:00
|
|
|
ENTRYPOINT ["/bin/woodpecker-server"]
|