mirror of
https://github.com/skidoodle/ncore-stats.git
synced 2026-04-28 07:47:36 +02:00
17 lines
329 B
Docker
17 lines
329 B
Docker
FROM golang:alpine AS builder
|
|
WORKDIR /build
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download
|
|
COPY . .
|
|
RUN CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o /out/ncore-stats .
|
|
|
|
|
|
FROM alpine:3
|
|
RUN apk add --no-cache ca-certificates
|
|
WORKDIR /app
|
|
COPY --from=builder /out/ncore-stats .
|
|
COPY web ./web
|
|
EXPOSE 3000
|
|
|
|
CMD ["./ncore-stats"]
|