forked from akankshadixit/iotex-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
45 lines (38 loc) · 2.67 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
FROM golang:1.10.2-stretch
RUN apt-get install -y --no-install-recommends make && \
mkdir -p $GOPATH/src/github.com/iotexproject/iotex-core/
COPY ./ $GOPATH/src/github.com/iotexproject/iotex-core/
ARG SKIP_DEP=false
RUN if [ "$SKIP_DEP" != true ] ; \
then \
cd $GOPATH/src/github.com/iotexproject/iotex-core/ && \
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh && \
dep ensure --vendor-only; \
fi
RUN mkdir -p $GOPATH/src/github.com/CoderZhi/go-ethereum/ && \
mkdir -p $GOPATH/pkg/linux_amd64/github.com/CoderZhi/ && \
rm -rf $GOPATH/src/github.com/iotexproject/iotex-core/vendor/github.com/CoderZhi/go-ethereum/ && \
cd $GOPATH/src/github.com/iotexproject/iotex-core/pkg/ && \
tar -xzvf go-ethereum.tar.gz && \
cp -r $GOPATH/src/github.com/iotexproject/iotex-core/pkg/go-ethereum/binary_linux/* $GOPATH/pkg/linux_amd64/github.com/CoderZhi/ && \
cp -r $GOPATH/src/github.com/iotexproject/iotex-core/pkg/go-ethereum/go-ethereum/* $GOPATH/src/github.com/CoderZhi/go-ethereum/ && \
rm -rf $GOPATH/src/github.com/iotexproject/iotex-core/pkg/go-ethereum/ && \
cd $GOPATH/src/github.com/iotexproject/iotex-core/ && \
make clean build && \
ln -s $GOPATH/src/github.com/iotexproject/iotex-core/bin/server /usr/local/bin/iotex-server && \
ln -s $GOPATH/src/github.com/iotexproject/iotex-core/bin/actioninjector /usr/local/bin/iotex-actioninjector && \
mkdir -p /usr/local/lib/iotex/ && \
ln -s $GOPATH/src/github.com/iotexproject/iotex-core/bin/addrgen /usr/local/bin/iotex-addrgen && \
mkdir -p /usr/local/lib/iotex/ && \
cp $GOPATH/src/github.com/iotexproject/iotex-core/crypto/lib/libsect283k1_ubuntu.so /usr/lib/ && \
cp $GOPATH/src/github.com/iotexproject/iotex-core/crypto/lib/blslib/libtblsmnt_ubuntu.so /usr/lib/ && \
mkdir -p /etc/iotex/ && \
echo "chain:" >> /etc/iotex/config.yaml && \
echo " producerPrivKey: \"925f0c9e4b6f6d92f2961d01aff6204c44d73c0b9d0da188582932d4fcad0d8ee8c66600\"" >> /etc/iotex/config.yaml && \
echo " producerPubKey: "336eb60a5741f585a8e81de64e071327a3b96c15af4af5723598a07b6121e8e813bbd0056ba71ae29c0d64252e913f60afaeb11059908b81ff27cbfa327fd371d35f5ec0cbc01705"" >> /etc/iotex/config.yaml && \
echo " genesisActionsPath: /etc/iotex/testnet_actions.yaml" >> /etc/iotex/config.yaml && \
echo "network:" >> /etc/iotex/config.yaml && \
echo " bootstrapNodes:" >> /etc/iotex/config.yaml && \
echo " - \"127.0.0.1:4689\"" >> /etc/iotex/config.yaml && \
ln -s $GOPATH/src/github.com/iotexproject/iotex-core/blockchain/testnet_actions.yaml /etc/iotex/testnet_actions.yaml
CMD [ "iotex-server", "-config-path=/etc/iotex/config.yaml"]