forked from Consensys/quorum-docker-Nnodes
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
91 lines (73 loc) · 2.65 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
FROM ubuntu:18.04 as builder
ARG CONSTELLATION_VERSION=0.3.5
ARG QUORUM_VERSION=2.5.0
WORKDIR /work
RUN apt-get update && \
apt-get install -y \
build-essential \
git \
libdb-dev \
libsodium-dev \
libtinfo-dev \
sysvbanner \
unzip \
wget \
zlib1g-dev
RUN wget -q https://github.com/jpmorganchase/constellation/releases/download/v0.3.5-build.1/constellation-0.3.5-ubuntu1604.tar.gz && \
tar -xvf constellation-$CONSTELLATION_VERSION-ubuntu1604.tar.gz && \
cp constellation-node /usr/local/bin && \
chmod 0755 /usr/local/bin/constellation-node && \
rm -rf constellation-$CONSTELLATION_VERSION-ubuntu1604.tar.gz constellation-node
ENV GOREL go1.12.7.linux-amd64.tar.gz
ENV PATH $PATH:/usr/local/go/bin
RUN wget -q https://storage.googleapis.com/golang/$GOREL && \
tar xfz $GOREL && \
mv go /usr/local/go && \
rm -f $GOREL
#RUN mkdir istanbul && cd istanbul && \
# GO111MODULE=on GOPATH=/work/istanbul go get -u github.com/jpmorganchase/istanbul-tools/cmd/istanbul && \
# cp bin/istanbul /usr/local/bin && \
# cd .. && rm -rf istanbul
RUN git clone https://github.com/jpmorganchase/istanbul-tools.git istanbul && \
cd istanbul && \
make && \
cp build/bin/istanbul /usr/local/bin/ && \
cd .. && rm -rf istanbul
RUN git clone https://github.com/jpmorganchase/quorum.git && \
cd quorum && \
git checkout v$QUORUM_VERSION && \
make all && \
cp build/bin/geth /usr/local/bin && \
cp build/bin/bootnode /usr/local/bin && \
cd .. && \
rm -rf quorum
### Create the runtime image, leaving most of the cruft behind (hopefully...)
FROM ubuntu:18.04
# Install add-apt-repository
RUN apt-get update && \
apt-get install -y --no-install-recommends software-properties-common && \
add-apt-repository ppa:ethereum/ethereum && \
apt-get update && \
apt-get install -y --no-install-recommends \
libdb-dev \
libleveldb-dev \
libsodium-dev \
zlib1g-dev\
libtinfo-dev \
solc && \
rm -rf /var/lib/apt/lists/* && \
mkdir /.ethereum && \
chown -R 1000:1000 /.ethereum && \
groupadd -g 1000 geth && useradd -u 1000 -g 1000 -s /bin/bash geth && \
mkdir /home/geth && chown 1000:1000 -R /home/geth
# Temporary useful tools
RUN apt-get update && \
apt-get install -y iputils-ping net-tools vim
COPY --from=builder \
/usr/local/bin/constellation-node \
/usr/local/bin/istanbul \
/usr/local/bin/geth \
/usr/local/bin/bootnode \
/usr/local/bin/
ENV SHELL=/bin/bash
CMD ["/qdata/start-node.sh"]