All checks were successful
Build and Publish Docker Image / deploy (push) Successful in 1m36s
30 lines
549 B
Docker
30 lines
549 B
Docker
FROM golang:1.23-alpine AS builder
|
|
|
|
WORKDIR /src
|
|
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download
|
|
|
|
COPY . .
|
|
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath -ldflags="-s -w" -o /out/cpu-benchmark-server .
|
|
|
|
FROM alpine:3.21
|
|
|
|
WORKDIR /app
|
|
|
|
RUN apk add --no-cache ca-certificates
|
|
|
|
COPY --from=builder /out/cpu-benchmark-server /app/cpu-benchmark-server
|
|
COPY templates /app/templates
|
|
|
|
ENV APP_ADDR=:8080
|
|
ENV BADGER_DIR=/data/badger
|
|
ENV PAGE_SIZE=50
|
|
ENV SHUTDOWN_TIMEOUT=10s
|
|
|
|
VOLUME ["/data"]
|
|
|
|
EXPOSE 8080
|
|
|
|
ENTRYPOINT ["/app/cpu-benchmark-server"]
|