diff --git a/.woodpecker.yml b/.woodpecker.yml index 081d131..b83a4dd 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -26,6 +26,17 @@ pipeline: when: event: [ "pull_request", "push" ] + build-docker: + image: plugins/kaniko + settings: + dockerfile: Dockerfile + no_push: true + repo: Codeberg/pages-server + tags: latest + when: + event: [ "pull_request", "push" ] + path: Dockerfile + build-tag: group: compliant image: a6543/golang_just diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..71dd236 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +FROM golang:alpine as build + +WORKDIR /workspace + +RUN apk add ca-certificates +COPY . . +RUN CGO_ENABLED=0 go build . + +FROM scratch +COPY --from=build /workspace/pages /pages +COPY --from=build \ + /etc/ssl/certs/ca-certificates.crt \ + /etc/ssl/certs/ca-certificates.crt + +ENTRYPOINT ["/pages"] \ No newline at end of file