Dependencies (vendor) are pre-loaded in build image
This commit is contained in:
parent
f579b97502
commit
56302a5d47
@ -34,6 +34,15 @@ RUN strip /opt/rocksdb/ldb /opt/rocksdb/sst_dump && \
|
||||
|
||||
RUN go get github.com/golang/dep/cmd/dep
|
||||
|
||||
RUN \
|
||||
cleanup() { rm -rf $GOPATH/src/blockbook; } && \
|
||||
trap cleanup EXIT && \
|
||||
cd $GOPATH/src && \
|
||||
git clone https://github.com/trezor/blockbook.git && \
|
||||
cd blockbook && \
|
||||
dep ensure -vendor-only && \
|
||||
cp -r vendor /build/vendor
|
||||
|
||||
ADD Makefile /build/Makefile
|
||||
|
||||
VOLUME /out
|
||||
|
||||
@ -42,7 +42,7 @@ prepare-sources:
|
||||
prepare-vendor:
|
||||
@ if [ "$(UPDATE_VENDOR)" -eq 1 ]; then \
|
||||
echo "Updating vendor"; \
|
||||
cd $(BLOCKBOOK_SRC) && rm -rf vendor?* && dep ensure -vendor-only ; \
|
||||
cd $(BLOCKBOOK_SRC) && rm -rf vendor* && cp -r /build/vendor . && dep ensure -vendor-only ; \
|
||||
else \
|
||||
echo "Update of vendor not demanded, keeping version from src" ; \
|
||||
fi
|
||||
|
||||
Loading…
Reference in New Issue
Block a user