This repository is now considered inactive as there is an official Energi Gen 3 Docker image and this repository is left for reference.
Below is the answer from the Energi support regarding running core node in a Docker container:
As for the Docker container - we do have a release at the Docker hub that can be pulled with the following command:
docker pull energicryptocurrency/energi3:v3.0.6Once you have pulled the image, you can create a new container with
sudo docker run -d --name CONTAINER_NAME -v /home/USER/nrgdocker:/root energicryptocurrency/energi3:v3.0.6This will create a new container named
CONTAINER_NAME
(replace with a name you seem fit) and create a persistent storage space to host your keystore / blockchain files at/home/USER/nrgdocker
(replace theUSER
portion with the current Linux user you are creating the container with).After the container is created, you can access the console and issue all the commands to check it is running and synchronizing (like
miner.stakingStatus()
andnrg.syncing
) with the following command:sudo docker exec -it CONTAINER_NAME energi3 attach
replacing
CONTAINER_NAME
by the name you chose for your container.To import a new wallet, you can place the keystore files at the
/home/USER/nrgdocker/.energicore3/keystore/
- again, replacingUSER
for the username you are currently creating the container with.
Here is a repository to make launching Energi Gen 3 Core Node in a Docker container easier using Docker Compose and the official Energi Gen 3 Docker image:
energi3-docker-compose
.
This fork was created to install Energi Gen 3 Core Node in a Docker container so Energi3 Core Node could be installed on any server that can run Docker.
Not sure, but it seems that it could be possible to run Energi Gen3 Core in a Docker container using this repository: https://github.com/energicryptocurrency/energi3 (using https://github.com/energicryptocurrency/energi3/blob/master/Dockerfile or https://github.com/energicryptocurrency/energi3/blob/master/containers/docker/master-ubuntu/Dockerfile).
Modifications were made with a single account staking in mind. More adjustments may be needed to stake using multiple accounts or to use Energi Gen 3 Core Node as a Masternode. Current solution for staking multiple accounts would be to run multiple containers, but it may be not an ideal solution performance-wise.
To run Energi Gen 3 Core Node in a Docker container:
-
clone this git repository:
git clone https://github.com/eandersons/energi3-provisioning.git
; -
create the following files:
Docker/configs/energi3_account_address
that contains the Energi Gen 3 account address;Docker/configs/energi3_account_password
that contains the Energi Gen 3 account password;
these files are used to get account's address and password to automatically unlock account for staking after the container has been started;
-
copy the file
scripts/linux/nodemon.conf
toDocker/configs
and adjust values in it if the node monitor should send notifications to an email and/or a SMS email gateway; -
run Docker container using
docker-compose
:cd /path/to/energi3-provisioning/Docker # `sudo` may be necessary to use `docker-compose` docker-compose up --detach
-
open the necessary ports for external inbound access in router and/or firewall:
39795
TCP;39796
TCP;39797
TCP and UDP;
not sure about the first two ports, but
39797
TCP/UDP port is required for staking and Masternode as it is mentioned here.
Possible improvements for Energi Gen 3 Core Node dockerization:
-
adjust
scripts/linux/energi3-linux-installer.sh
to be suitable for installation in Docker containers as well;DOCKER
could be the environment variable that is used to control whether installation should be interactive or not with a value something liketrue
,1
oryes
; -
make necessary adjustments to stake multiple accounts in a single dockerized Energi Gen 3 Core Node instance;
-
make necessary adjustments to run dockerized Energi Gen 3 Core Node as a Masternode;
-
make Energi Core Node Monitor installation optional;
-
create a separate APT packages list for Energi Gen 3 Core installation in Docker container as not all of them are used in dockerized core version.
Any suggestions and solutions for improvements are welcome.
This section contains the original content of
README.md
with minor formatting adjustments.
This repository has provisioning scripts as well as startup scripts for Energi Core Node:
-
Linux/VPS
energi3-linux-installer.sh
: provisioning Script for amd64 or x86_64 Linuxenergi3-aarch64-installer.sh
: provisioning Script for RPi and i386 (32-bit inux)start_staking.sh
: start Stakingstart_screen_staking.sh
: start Staking withinscreen
start_mn.sh
: start Masternodestart_screen_mn.sh
: start Masternode withinscreen
energi3-cli
: wrapper command-line script
-
Windows
energi3-windows-installer.bat
: provisioning Scriptstart_mn.bat
: start Masternodestart_staking.bat
: start Stakingenergi3.ico
: energi Icon Logo
-
MacOS
energi3-macos-installer.sh
: provisioning Scriptstart_node.sh
: script to start staking/mastrnode in mainnet or testnetstart_staking.sh
: start Stakingstart_mn.sh
: start Masternode