feta/Dockerfile

23 lines
542 B
Docker
Raw Normal View History

2019-10-24 10:38:16 +00:00
FROM golang:1.13 as builder
WORKDIR /go/src/github.com/sneak/fediverse-archive
COPY . .
RUN go get -v && make build
2019-10-25 16:38:45 +00:00
WORKDIR /go
RUN tar -c src | bzip2 > go-src.tbz2
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
COPY --from=builder /go/src/github.com/sneak/fediverse-archive/fediverse-archive /bin/fediverse-archive
2019-10-25 16:38:45 +00:00
# put the source in there too for safekeeping
COPY --from=builder /go/go-src.tbz2 /usr/local/src/go-src.tbz2
2019-10-24 10:38:16 +00:00
CMD /bin/fediverse-archive
# FIXME add testing