Files
uptimesebi/Dockerfile
T
Sebi d092eb25dd
renovate/stability-days Updates have not met minimum release age requirement
ci / image (pull_request) Successful in 3m21s
ci / build (pull_request) Successful in 8m55s
ci / test (pull_request) Successful in 12m24s
ci / lint (pull_request) Successful in 15m30s
chore(deps): pin dependencies
2026-11-22 23:12:25 +00:00

25 lines
846 B
Docker

# syntax=docker/dockerfile:1
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"]