aboutsummaryrefslogtreecommitdiffstats
path: root/packages/devnet/Dockerfile
diff options
context:
space:
mode:
authorAlex Browne <stephenalexbrowne@gmail.com>2018-05-22 04:56:32 +0800
committerAlex Browne <stephenalexbrowne@gmail.com>2018-06-07 03:39:39 +0800
commit577156fe5f63e581b101682d13b7e70e7a9336e5 (patch)
tree202d928d4888825a4ea1f24e2fd03368643c2966 /packages/devnet/Dockerfile
parentda3f783a9ff69b059b1a98f502d980660d6bacab (diff)
downloaddexon-0x-contracts-577156fe5f63e581b101682d13b7e70e7a9336e5.tar
dexon-0x-contracts-577156fe5f63e581b101682d13b7e70e7a9336e5.tar.gz
dexon-0x-contracts-577156fe5f63e581b101682d13b7e70e7a9336e5.tar.bz2
dexon-0x-contracts-577156fe5f63e581b101682d13b7e70e7a9336e5.tar.lz
dexon-0x-contracts-577156fe5f63e581b101682d13b7e70e7a9336e5.tar.xz
dexon-0x-contracts-577156fe5f63e581b101682d13b7e70e7a9336e5.tar.zst
dexon-0x-contracts-577156fe5f63e581b101682d13b7e70e7a9336e5.zip
Use Geth for contract tests
Diffstat (limited to 'packages/devnet/Dockerfile')
-rw-r--r--packages/devnet/Dockerfile29
1 files changed, 29 insertions, 0 deletions
diff --git a/packages/devnet/Dockerfile b/packages/devnet/Dockerfile
new file mode 100644
index 000000000..1115112bd
--- /dev/null
+++ b/packages/devnet/Dockerfile
@@ -0,0 +1,29 @@
+FROM alpine:3.7
+
+RUN \
+ apk add --update go git make gcc musl-dev linux-headers ca-certificates && \
+ # TODO(albrow): Change the Git URL and branch once we have all relvant PRs
+ # merged to upstream.
+ git clone --depth 1 --branch sethead-txpool-fix https://github.com/0xProject/go-ethereum && \
+ (cd go-ethereum && make geth) && \
+ cp go-ethereum/build/bin/geth /geth && \
+ apk del go git make gcc musl-dev linux-headers && \
+ rm -rf /go-ethereum && rm -rf /var/cache/apk/*
+
+RUN mkdir ~/devnet
+WORKDIR ~/devnet
+
+COPY genesis.json .
+COPY node0/ ./node0
+COPY run.sh .
+
+RUN /geth --datadir node0/ init genesis.json
+
+EXPOSE 8501
+EXPOSE 30310
+
+ENTRYPOINT ./run.sh
+
+# TODO(albrow): Send a single transaction to increment the block number from 0
+# to 1. This seems to prevent bugs in the tests. (There's probably something
+# Geth doesn't like about getting reset back to block 0).