Files
Sebi 866e4c2313
renovate/stability-days Updates have not met minimum release age requirement
ci / image (pull_request) Successful in 5m10s
ci / build (pull_request) Successful in 9m5s
ci / lint (pull_request) Failing after 10m22s
ci / test (pull_request) Successful in 18m16s
chore(deps): pin dependencies
2026-11-23 16:21:49 +00:00

25 lines
918 B
Docker

# syntax=docker/dockerfile:1@sha256:572cebbc2b15e6f84c077742952674889cb63cd5e9b80abdffcbe587b6f19183
FROM node:24-alpine AS web
WORKDIR /src
COPY package.json package-lock.json ./
RUN npm ci --no-audit --no-fund
COPY internal/web ./internal/web
RUN npm run build
FROM golang:1.27-alpine AS build
WORKDIR /src
COPY go.mod go.sum ./
RUN go mod download
COPY . .
COPY --from=web /src/internal/web/static/dist ./internal/web/static/dist
ARG VERSION=dev
ARG COMMIT=none
RUN CGO_ENABLED=0 go build -trimpath \
-ldflags "-s -w -X git.zb-server.de/ZB-Server/uptimesebi/internal/buildinfo.Version=${VERSION} -X git.zb-server.de/ZB-Server/uptimesebi/internal/buildinfo.Commit=${COMMIT}" \
-o /out/ ./cmd/...
FROM gcr.io/distroless/static-debian12:nonroot@sha256:afa5c872c891853ca7fcf1f12c3edb23f7eeef36189728842dd51042ff57f7ab
COPY --from=build /out/ /usr/local/bin/
USER nonroot
ENTRYPOINT ["/usr/local/bin/api"]