aboutsummaryrefslogtreecommitdiff
path: root/Dockerfile
blob: f6093f29a5164cd03d04dad374caa2d221a31b25 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
FROM golang:1.24 AS builder

WORKDIR /complexity-analyzer

RUN apt-get update && apt-get install -y gcc libc6-dev make git

ENV CGO_ENABLED=1

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

COPY . .
RUN go build -o complexity-analyzer

FROM golang:1.24

WORKDIR /complexity-analyzer

COPY --from=builder /complexity-analyzer/complexity-analyzer .
COPY --from=builder /complexity-analyzer/templates ./templates
COPY --from=builder /complexity-analyzer/static ./static

EXPOSE 3000

CMD ["./complexity-analyzer"]