FROM alpine as builder

RUN apk add --no-cache build-base

WORKDIR /app

COPY Makefile .
COPY src src/
COPY include include/

RUN make

FROM alpine

WORKDIR /srv

COPY static static/

COPY --from=builder /app/build/server .

CMD ["./server", "5000"]
