update dockerfile to save source code

This commit is contained in:
Jeffrey Paul 2019-10-25 09:50:32 -07:00
parent da802f3003
commit 055abf8149
1 changed files with 3 additions and 2 deletions

View File

@ -6,7 +6,8 @@ COPY . .
RUN go get -v && make build
WORKDIR /go
RUN tar -c src | bzip2 > go-src.tbz2
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.
@ -15,7 +16,7 @@ FROM alpine
COPY --from=builder /go/src/github.com/sneak/fediverse-archive/fediverse-archive /bin/fediverse-archive
# put the source in there too for safekeeping
COPY --from=builder /go/go-src.tbz2 /usr/local/src/go-src.tbz2
COPY --from=builder /go/go-src.tgz /usr/local/src/go-src.tgz
CMD /bin/fediverse-archive