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"]