Forked from nhapentor/$Running a Private Ethereum Blockchain using Docker.markdown
Created
July 9, 2022 17:24
-
-
Save bennotti/2b289b5d57cd9bedfa0d9221e5e44d4a to your computer and use it in GitHub Desktop.
Revisions
-
nhapentor revised this gist
May 13, 2021 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -11,6 +11,6 @@ "ethash": {} }, "difficulty": "1", "gasLimit": "12000000", "alloc": {} } -
nhapentor revised this gist
May 13, 2021 . 1 changed file with 8 additions and 8 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -15,9 +15,9 @@ services: --nodiscover --ipcdisable --networkid=${NETWORK_ID} --netrestrict="172.16.254.0/28" networks: priv-eth-net: geth-rpc-endpoint: hostname: geth-rpc-endpoint @@ -34,11 +34,11 @@ services: --http.api="eth,web3,net,admin,personal" --http.corsdomain="*" --networkid=${NETWORK_ID} --netrestrict="172.16.254.0/28" ports: - "8545:8545" networks: priv-eth-net: geth-miner: hostname: geth-miner @@ -52,13 +52,13 @@ services: --mine --miner.threads=1 --networkid=${NETWORK_ID} --netrestrict="172.16.254.0/28" networks: priv-eth-net: networks: priv-eth-net: driver: bridge ipam: config: - subnet: 172.16.254.0/28 -
nhapentor revised this gist
May 13, 2021 . 2 changed files with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ # The ID of Ethereum Network NETWORK_ID=1214 # The password to create and access the primary account ACCOUNT_PASSWORD=5uper53cr3t This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ { "config": { "chainId": 1214, "homesteadBlock": 0, "eip150Block": 0, "eip155Block": 0, -
nhapentor renamed this gist
Apr 13, 2021 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
nhapentor renamed this gist
Apr 13, 2021 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
nhapentor revised this gist
Apr 13, 2021 . 4 changed files with 98 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,5 @@ # The ID of Ethereum Network NETWORK_ID=1212 # The password to create and access the primary account ACCOUNT_PASSWORD=5uper53cr3t This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ FROM ethereum/client-go:v1.10.1 ARG ACCOUNT_PASSWORD COPY genesis.json /tmp RUN geth init /tmp/genesis.json \ && rm -f ~/.ethereum/geth/nodekey \ && echo ${ACCOUNT_PASSWORD} > /tmp/password \ && geth account new --password /tmp/password \ && rm -f /tmp/password ENTRYPOINT ["geth"] This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,64 @@ version: '3.7' services: geth-bootnode: hostname: geth-bootnode env_file: - .env image: geth-client build: context: . args: - ACCOUNT_PASSWORD=${ACCOUNT_PASSWORD} command: --nodekeyhex="b0ac22adcad37213c7c565810a50f1772291e7b0ce53fb73e7ec2a3c75bc13b5" --nodiscover --ipcdisable --networkid=${NETWORK_ID} --netrestrict="172.25.0.0/24" networks: chainnet: geth-rpc-endpoint: hostname: geth-rpc-endpoint env_file: - .env image: geth-client depends_on: - geth-bootnode command: --bootnodes="enode://af22c29c316ad069cf48a09a4ad5cf04a251b411e45098888d114c6dd7f489a13786620d5953738762afa13711d4ffb3b19aa5de772d8af72f851f7e9c5b164a@geth-bootnode:30303" --allow-insecure-unlock --http --http.addr="0.0.0.0" --http.api="eth,web3,net,admin,personal" --http.corsdomain="*" --networkid=${NETWORK_ID} --netrestrict="172.25.0.0/24" ports: - "8545:8545" networks: chainnet: geth-miner: hostname: geth-miner env_file: - .env image: geth-client depends_on: - geth-bootnode command: --bootnodes="enode://af22c29c316ad069cf48a09a4ad5cf04a251b411e45098888d114c6dd7f489a13786620d5953738762afa13711d4ffb3b19aa5de772d8af72f851f7e9c5b164a@geth-bootnode:30303" --mine --miner.threads=1 --networkid=${NETWORK_ID} --netrestrict="172.25.0.0/24" networks: chainnet: networks: chainnet: driver: bridge ipam: config: - subnet: 172.25.0.0/24 This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ { "config": { "chainId": 1212, "homesteadBlock": 0, "eip150Block": 0, "eip155Block": 0, "eip158Block": 0, "byzantiumBlock": 0, "constantinopleBlock": 0, "petersburgBlock": 0, "ethash": {} }, "difficulty": "1", "gasLimit": "8000000", "alloc": {} } -
nhapentor created this gist
Apr 13, 2021 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ Running a Private Ethereum Blockchain using Docker -------------------- Put genesis.json, Dockerfile, docker-compose.yml and .env files together in the same folder. Then run the command. ``` docker-compose up ```