build in CI, not in docker
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed

This commit is contained in:
2026-02-14 15:53:28 -05:00
parent a679d229f8
commit 873875c33a
2 changed files with 9 additions and 8 deletions

View File

@@ -7,6 +7,13 @@
- go_build_cache:/root/.cache/go-build - go_build_cache:/root/.cache/go-build
- go_mod_cache:/go/pkg/mod - go_mod_cache:/go/pkg/mod
build: build:
image: golang:1.26
commands:
- RUN CGO_ENABLED=0 GOOS=linux go build -o server ./cmd/serve
volumes:
- go_build_cache:/root/.cache/go-build
- go_mod_cache:/go/pkg/mod
container:
image: docker image: docker
commands: commands:
- apk add curl - apk add curl

View File

@@ -1,9 +1,3 @@
FROM golang:1.26
WORKDIR /src
COPY . ./
RUN CGO_ENABLED=0 GOOS=linux go build -o server ./cmd/serve
FROM scratch FROM scratch
COPY --from=0 /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ COPY server ./
COPY --from=0 /src/server ./
CMD ["/server"] CMD ["/server"]