You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
736 B

FROM golang:1.14 as builder
WORKDIR /go/src/
COPY . .
#RUN make lint && make build
RUN make build
RUN tar cvfz go-src.tgz src && du -sh *
# this container doesn't do anything except hold the build artifact
# and make sure it compiles.
FROM alpine
RUN mkdir -p /app/bin
COPY --from=builder /go/src/ /app/bin/server
# FIXME figure out how to embed these stupid templates
COPY --from=builder /go/src/ /app/view
# put the source in there too for safekeeping
COPY --from=builder /go/go-src.tgz /usr/local/src/go-src.tgz
# this is where the db gets stored:
VOLUME /data
CMD /app/bin/server
# FIXME add testing