- Use custom image registry (somegit.dev) with pull secrets and "latest" tag. - Enable HTTPRoute with hostname "heatguard.dev" and TLS via cert-manager. - Activate autoscaling with min/max replicas and resource metrics. - Switch Dockerfile to Alpine runtime with nonroot user. - Add helm directory to .dockerignore.
28 lines
366 B
Docker
28 lines
366 B
Docker
FROM golang:1.25-alpine AS build
|
|
|
|
RUN apk add --no-cache nodejs npm make
|
|
|
|
WORKDIR /src
|
|
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download
|
|
|
|
COPY package.json package-lock.json ./
|
|
RUN npm ci
|
|
|
|
COPY . .
|
|
|
|
RUN make build
|
|
|
|
FROM alpine:3
|
|
|
|
RUN adduser -D -u 65532 nonroot
|
|
|
|
COPY --from=build /src/bin/heatguard /heatguard
|
|
|
|
EXPOSE 8080
|
|
|
|
USER nonroot:nonroot
|
|
|
|
ENTRYPOINT ["/heatguard"]
|