all repos — guesser @ ab432ae955c70c86aea1ac6ad07c39871bc29727

Dockerfile (view raw)

 1# syntax=docker/dockerfile:1
 2
 3FROM golang:1.23-alpine AS builder
 4
 5WORKDIR /build
 6
 7# Download Go modules
 8COPY go.mod .
 9RUN go mod download
10RUN go mod verify
11
12# Transfer source code
13COPY *.go .
14COPY *.html .
15
16# Build
17RUN CGO_ENABLED=0 go build -trimpath -o /dist/app
18
19# Test
20FROM builder AS run-test-stage
21RUN go test -v ./...
22
23FROM alpine AS build-release-stage
24
25RUN apk add --no-cache ffmpeg
26
27WORKDIR /app
28
29COPY --from=builder /dist .
30ENTRYPOINT ["./app"]