Skip to content
Cron node Docker
Dockerfile Makefile Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
config
scripts
.gitignore
Dockerfile
Makefile
README.md
SETUP.md
docker-compose.yml

README.md

NEO Docker

This docker is used for CRON blockchain

Information


Folder structure inside docker:
/neo-cli/Index_00A80801
/neo-cli/Chain_00A80801

Ports:
10331 - JSON-RPC via HTTPS
10332 - JSON-RPC via HTTP 
10333 - P2P via TCP
10334 - P2P via WebSocket

config.json
"Magic": 67827978 - for each blockchain this should be different, (67827978 = CRON in decimal) from this is created folder structure name "00A80801"
StandbyValidators - Masternode public keys
SeedList - Masternode and RPC node list

#(WARNING! by opening JSON-RPC port 10332 or 10331, if you have unlocked wallet everyone can access private key)

Cat Makefile for command shortcuts

cat Makefile

Edit config files

Config files will be copied to docker image in build stage

Edit config/config.json Edit config/protocol.json

Setup docker

sudo apt-get install -y \
    apt-transport-https \
    ca-certificates \
    curl \
    software-properties-common

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

sudo add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
   $(lsb_release -cs) \
   stable"


sudo apt-get update && sudo apt-get install -y docker-ce

Setup docker-compose

sudo curl -L https://github.com/docker/compose/releases/download/1.18.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
docker-compose --version

Setup seed using docker

# clone repository
git clone https://github.com/cronfoundation/cron-node.git
cd cron-node

# install make
sudo apt-get install make -y

# add docker network
sudo docker network create neo

# build docker image
sudo make build

# start seed node
sudo make run

# see running containers
sudo docker ps -a
sudo docker ps -a | grep cron

# access cron-cli
sudo make cli

# access bash inside docker 
sudo make exec

# curl request to api to see sync status, from inside docker, or from outside if ports are opened.
curl -d '{"jsonrpc": "2.0", "method": "getblockcount", "params": [], "id": 5}' localhost:10332

Open firewall ports

# 10333 - P2P communication, required for node synchronization
# 10332 - RPC-API access (WARNING! by opening this port if you have unlocked wallet everyone can access private key)
sudo ufw default deny incoming
sudo ufw default allow outgoing
sudo ufw allow ssh
sudo ufw allow 10333
sudo ufw allow 10332 #(WARNING! by opening this port if you have unlocked wallet everyone can access private key)
sudo ufw enable
You can’t perform that action at this time.