-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathDockerfile
37 lines (33 loc) · 1.24 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
# For running this container as non-root user, see
# https://github.com/ethereum/cpp-ethereum/blob/develop/scripts/docker-eth
# or call `docker run` like this:
#
## mkdir -p ~/.ethereum ~/.web3
## docker run --rm -it \
## -p 0.0.0.0:30303:30303 \
## -v ~/.ethereum:/.ethereum -v ~/.web3:/.web3 \
## -e HOME=/ --user $(id -u):$(id -g) ethereum/client-cpp
FROM alpine
RUN apk add --no-cache \
libstdc++ \
gmp \
leveldb --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing/ \
&& apk add --no-cache --virtual .build-deps \
git \
cmake \
g++ \
make \
linux-headers \
leveldb-dev --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing/ \
&& sed -i -E -e 's|#warning|//#warning|' /usr/include/sys/poll.h \
&& git clone --recursive https://github.com/ethereum/cpp-ethereum --branch develop --single-branch --depth 1 \
&& mkdir /build && cd /build \
&& cmake /cpp-ethereum -DCMAKE_BUILD_TYPE=RelWithDebInfo -DTOOLS=Off -DTESTS=Off \
&& make eth \
&& make install \
&& cd / && rm /build -rf \
&& rm /cpp-ethereum -rf \
&& apk del .build-deps \
&& rm /var/cache/apk/* -f
EXPOSE 30303
ENTRYPOINT [ "/usr/local/bin/eth" ]