2022-08-31 14:27:06 +00:00
|
|
|
FROM --platform=$BUILDPLATFORM golang:1.18 AS certs
|
2021-10-04 15:09:22 +00:00
|
|
|
|
|
|
|
FROM scratch
|
2022-03-01 15:40:24 +00:00
|
|
|
ARG TARGETOS TARGETARCH
|
2021-10-04 15:09:22 +00:00
|
|
|
ENV GODEBUG=netdns=go
|
2021-10-28 19:02:43 +00:00
|
|
|
ENV WOODPECKER_DATABASE_DATASOURCE=/var/lib/woodpecker/woodpecker.sqlite
|
2021-10-04 15:09:22 +00:00
|
|
|
ENV WOODPECKER_DATABASE_DRIVER=sqlite3
|
2021-10-28 19:02:43 +00:00
|
|
|
ENV XDG_CACHE_HOME=/var/lib/woodpecker
|
2022-03-01 15:40:24 +00:00
|
|
|
EXPOSE 8000 9000 80 443
|
2021-10-04 15:09:22 +00:00
|
|
|
|
2022-06-16 23:57:02 +00:00
|
|
|
# copy certs from golang:1.18 image
|
2022-03-01 15:40:24 +00:00
|
|
|
COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
|
|
|
|
# copy server binary
|
|
|
|
COPY dist/server/${TARGETOS}/${TARGETARCH}/woodpecker-server /bin/
|
2021-10-04 15:09:22 +00:00
|
|
|
|
|
|
|
ENTRYPOINT ["/bin/woodpecker-server"]
|