summaryrefslogtreecommitdiff
path: root/Dockerfile
blob: 28137e1b97429d137713494622eb84493f85d8dd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# Build stage
FROM golang:1.24 AS builder

WORKDIR /usr/src/app

COPY go.mod go.sum ./
RUN go mod download

COPY . .
RUN go build -v -o /usr/local/bin/app ./...

# Final stage
FROM debian:12-slim

RUN apt-get update && apt-get install -y ca-certificates
WORKDIR /usr/src/app

COPY --from=builder /usr/local/bin/app /usr/local/bin/app

CMD ["app"]