aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJimmy Hu <jimmy.hu@dexon.org>2018-10-09 21:07:01 +0800
committerGitHub <noreply@github.com>2018-10-09 21:07:01 +0800
commit360a88aee800d25a942aeb8917e9b6ef0690aa27 (patch)
tree900ad1e1c3cb6440abcf50fea108e3c13e25f78a
parent599d410e062f3b04763c628d1eb4815ff6d4d109 (diff)
downloaddexon-consensus-360a88aee800d25a942aeb8917e9b6ef0690aa27.tar
dexon-consensus-360a88aee800d25a942aeb8917e9b6ef0690aa27.tar.gz
dexon-consensus-360a88aee800d25a942aeb8917e9b6ef0690aa27.tar.bz2
dexon-consensus-360a88aee800d25a942aeb8917e9b6ef0690aa27.tar.lz
dexon-consensus-360a88aee800d25a942aeb8917e9b6ef0690aa27.tar.xz
dexon-consensus-360a88aee800d25a942aeb8917e9b6ef0690aa27.tar.zst
dexon-consensus-360a88aee800d25a942aeb8917e9b6ef0690aa27.zip
simulation: Fix docker build fail (#188)
-rw-r--r--GNUmakefile4
-rwxr-xr-xbin/install_dkg_dep.sh4
-rw-r--r--images/dexon-alpine/Dockerfile4
3 files changed, 9 insertions, 3 deletions
diff --git a/GNUmakefile b/GNUmakefile
index e1fc38a..bbf6c9f 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -7,7 +7,7 @@ else
BINDIR := $(abspath $(BINDIR))
endif
PROJECT_ROOT=github.com/dexon-foundation/dexon-consensus-core
-BUILDER_REPO = cobinhooddev/ci-base-alpine
+BUILDER_REPO = dexonfoundation/dexon-alpine
ifeq ($(DOCKER),true)
GO_LDFLAGS += -linkmode external -extldflags \"-static\"
@@ -30,6 +30,8 @@ ifeq ($(DOCKER),true)
-e "GOPATH=/go" \
-w /go/src/$(PROJECT_ROOT) \
$(BUILDER_REPO):latest sh -c "\
+ cd .dep/dkg/mcl && make clean; cd -; \
+ cd .dep/dkg/bls && make clean && make test_go DOCKER=alpine -j; cd -; \
go build -o /artifacts/$1 $(PROJECT_ROOT)/cmd/$1"
else
@mkdir -p $(BINDIR)
diff --git a/bin/install_dkg_dep.sh b/bin/install_dkg_dep.sh
index 56ac6b3..40ae2be 100755
--- a/bin/install_dkg_dep.sh
+++ b/bin/install_dkg_dep.sh
@@ -4,7 +4,6 @@ if [ -e .dep/dkg ]; then
exit 0
fi
-rm -rf vendor/github.com/herumi/*
if [ ! -d .dep/dkg ]; then
mkdir -p .dep/dkg
cd .dep/dkg
@@ -17,4 +16,5 @@ if [ ! -d .dep/dkg ]; then
make test_go -j
cd ../../../
fi
-cp -r .dep/dkg/* vendor/github.com/Spiderpowa
+cd vendor/github.com/Spiderpowa && rm -rf *
+ln -s ../../../.dep/dkg/* .
diff --git a/images/dexon-alpine/Dockerfile b/images/dexon-alpine/Dockerfile
new file mode 100644
index 0000000..1b4f9b3
--- /dev/null
+++ b/images/dexon-alpine/Dockerfile
@@ -0,0 +1,4 @@
+FROM golang:alpine
+MAINTAINER Jimmy Hi <jimmy.hu@dexon.org>
+
+RUN apk add --update-cache build-base gmp-dev openssl-dev