From 17ec55da2a7a97b756334943499eb1f1308e3477 Mon Sep 17 00:00:00 2001 From: Alexander Kolotov Date: Tue, 19 Mar 2019 13:44:23 +0300 Subject: [PATCH] Docker environment support --- .dockerignore | 5 +++++ Dockerfile | 9 +++++++++ README.md | 18 +++++++++++++++++- docker-compose.yml | 6 ++++++ 4 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 .dockerignore create mode 100644 Dockerfile create mode 100644 docker-compose.yml diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..4126ad5 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,5 @@ +.git +.gitignore +README.md +docker-compose.yml +Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..6e395c2 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,9 @@ +FROM parity/parity:v1.11.11 + +WORKDIR /stuff + +COPY . . + +RUN env PARITY=/parity/parity ./prepare-chain.sh + +CMD ["--config", "classic_aura.toml", "--jsonrpc-interface", "all"] diff --git a/README.md b/README.md index 9b10383..f39fb45 100644 --- a/README.md +++ b/README.md @@ -44,4 +44,20 @@ As soon as the block issuer configured, run the node with: ```shell parity --config classic_aura.toml -``` \ No newline at end of file +``` + +### Run the docker container + +The docker container can be used to integrate the local testnet in your testing environmnet. Please refer to example of [the Docker Compose configuration file](docker-compose.yml) for reference. + +Prior to running the container, go to the bottom of [the genesis file](classic_aura.json) and add accounts that will have some _ether_ prefunded. + +To try the docker container, invoke: +```shell +$ docker-compose up --build +``` + +To stop the container: +```shell +$ docker-compose down +``` diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..a97a868 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,6 @@ +version: "3.3" +services: + parity-classic: + build: . + ports: + - "8545:8545"