Files
schemas/Dockerfile
T
renovate 6469dd28ce
Unbound Release / Create Tag (push) Successful in 27s
Unbound Release / Create Release (push) Skipped
Unbound Release / Check Preconditions (push) Successful in 24s
Release / release (push) Failing after 1m8s
Unbound Release / Generate Changelog and Handle PR (push) Failing after 43s
pre-commit / pre-commit (push) Successful in 2m57s
schemas / build (push) Successful in 4m6s
schemas / check (push) Successful in 1m41s
schemas / vulnerabilities (push) Successful in 1m0s
schemas / check-release (push) Successful in 1m3s
schemas / deploy-prod (push) Successful in 1m11s
chore(deps): update golang:1.26.5 docker digest to e8ab809 (#913)
2026-08-11 07:06:50 +00:00

46 lines
1.6 KiB
Docker

FROM amd64/golang:1.26.5@sha256:e8ab809ec169291532860acdcd50d5b43a9fcea3c4f381226c5cdc4254ad8ecc as modules
WORKDIR /build
ADD go.* /build
RUN go mod download
FROM modules as build
ARG CI_COMMIT
WORKDIR /build
ENV CGO_ENABLED=0
ADD . /build
RUN CGO_ENABLED=1 go test -mod=readonly -race -coverprofile=coverage.txt.tmp -covermode=atomic -coverpkg=$(go list ./... | tr '\n' , | sed 's/,$//') ./...
RUN ["/bin/bash", "-c", "cat coverage.txt.tmp | grep -v testing.go | grep -v -f <(find . -type f | xargs grep -l 'Code generated by github.com/99designs/gqlgen, DO NOT EDIT') > coverage.txt"]
RUN go tool cover -html=coverage.txt -o coverage.html
RUN go tool cover -func=coverage.txt
RUN rm coverage.txt.tmp
RUN GOOS=linux GOARCH=amd64 go build \
-a -installsuffix cgo \
-mod=readonly \
-o /release/service \
-ldflags "-w -s -X main.buildVersion=${CI_COMMIT}" \
./cmd/service/service.go
FROM scratch as export
COPY --from=build /build/coverage.txt /
FROM node:24.19.0-alpine@sha256:d32cdf619f63fe0471182d08996dd516c6275bb5fd31ae06e55a570bd9e1ad43
ENV TZ Europe/Stockholm
# Install wgc CLI globally for Cosmo Router composition
RUN npm install -g wgc@latest
# Cap Node.js heap for runtime wgc invocations. 512MB leaves room for
# composing supergraphs with many subgraphs; lower caps (e.g. 64MB) OOM
# wgc as the subgraph count grows.
ENV NODE_OPTIONS="--max-old-space-size=512"
# Copy timezone data and certificates
COPY --from=build /usr/share/zoneinfo /usr/share/zoneinfo
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
# Copy the service binary
COPY --from=build /release/service /
CMD ["/service"]