Dependencies (vendor) are pre-loaded in build image
This commit is contained in:
parent
f579b97502
commit
56302a5d47
@ -27,13 +27,22 @@ RUN echo -n "GO version: " && go version
|
||||
RUN echo -n "GOPATH: " && echo $GOPATH
|
||||
|
||||
# install rocksdb
|
||||
RUN cd /opt && git clone -b $ROCKSDB_VERSION --depth 1 https://github.com/facebook/rocksdb.git
|
||||
RUN cd /opt && git clone -b $ROCKSDB_VERSION --depth 1 https://github.com/facebook/rocksdb.git
|
||||
RUN cd /opt/rocksdb && CFLAGS=-fPIC CXXFLAGS=-fPIC make -j 4 release
|
||||
RUN strip /opt/rocksdb/ldb /opt/rocksdb/sst_dump && \
|
||||
cp /opt/rocksdb/ldb /opt/rocksdb/sst_dump /build
|
||||
|
||||
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