feta/Dockerfile

24 lines
479 B
Docker
Raw Normal View History

2019-10-24 10:38:16 +00:00
FROM golang:1.13 as builder
2019-11-03 10:56:50 +00:00
WORKDIR /go/src/github.com/sneak/feta
2019-10-24 10:38:16 +00:00
COPY . .
RUN go get -v && make build
2019-10-25 16:38:45 +00:00
WORKDIR /go
2019-10-25 16:50:32 +00:00
RUN tar cvfz go-src.tgz src && du -sh *
2019-10-24 10:38:16 +00:00
# this container doesn't do anything except hold the build artifact
# and make sure it compiles.
FROM alpine
2019-11-03 10:56:50 +00:00
COPY --from=builder /go/src/github.com/sneak/feta/feta /bin/feta
2019-10-24 10:38:16 +00:00
2019-10-25 16:38:45 +00:00
# put the source in there too for safekeeping
2019-10-25 16:50:32 +00:00
COPY --from=builder /go/go-src.tgz /usr/local/src/go-src.tgz
2019-10-25 16:38:45 +00:00
2019-11-03 10:56:50 +00:00
CMD /bin/feta
2019-10-24 10:38:16 +00:00
# FIXME add testing