summaryrefslogtreecommitdiff
path: root/Dockerfile
blob: 089bd0f29664344fb26e1f5fc78ec5c0bd9e7d90 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
FROM reg.nx.kroot.sh/makko AS builder-makko

WORKDIR /src
COPY blog/ blog/
COPY templates/ templates/
COPY makko.json .

RUN makko .

FROM golang:alpine AS builder-go

WORKDIR /src
COPY server/go.mod server/main.go ./
COPY --from=builder-makko /src/web ./static/

RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o /blog-server .

FROM scratch

COPY --from=builder-go /blog-server /blog-server

EXPOSE 8080
ENTRYPOINT ["/blog-server"]