update dockerfile to save source code
This commit is contained in:
parent
da802f3003
commit
055abf8149
@ -6,7 +6,8 @@ COPY . .
|
|||||||
RUN go get -v && make build
|
RUN go get -v && make build
|
||||||
|
|
||||||
WORKDIR /go
|
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
|
# this container doesn't do anything except hold the build artifact
|
||||||
# and make sure it compiles.
|
# 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
|
COPY --from=builder /go/src/github.com/sneak/fediverse-archive/fediverse-archive /bin/fediverse-archive
|
||||||
|
|
||||||
# put the source in there too for safekeeping
|
# 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
|
CMD /bin/fediverse-archive
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user