442ac9f580
- .golangci.yml — 50+ linters enabled - .yamllint — yaml lint rules - cicd.yaml — CI/CD with lint-go (golangci, staticcheck, gosec, revive), lint-yaml, build+test, publish - Dockerfile — multi-stage scratch build - go vet passes clean
13 lines
371 B
Docker
13 lines
371 B
Docker
FROM golang:1.23-alpine AS builder
|
|
RUN apk add --no-cache git ca-certificates
|
|
WORKDIR /src
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download
|
|
COPY . .
|
|
RUN CGO_ENABLED=0 go build -ldflags="-s -w" -o /gosleep-timer .
|
|
|
|
FROM scratch
|
|
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
|
|
COPY --from=builder /gosleep-timer /gosleep-timer
|
|
ENTRYPOINT ["/gosleep-timer"]
|