Dockerized Tezos Node Full or Archive History Mode Optional Bootstrapping for Full Node
Simply build and run the container specifying the following ENV variables with the desired options
BOOTSTRAP
- TRUE
- FALSE NODE_TYPE
- full
- archive
Before starting the tezos-node, the entrypoint script downloads and imports a snapshot (only if BOOTSTRAP=TRUE) which drastically reduces the time required to sync. (If you have an alternate snapshot that is preferred you can simply change the url in the entrypoint.sh script).
Additionally, there is only one container created whereas running the Tezos official script creates more than a few.
- Docker
The image can be run without any configuration and defaults to mainnet.
docker run --rm -d -P ryanhendricks/docker-tezos:latest
The image uses Supervisor to run the tezos node at container runtime. Supervisor also restarts the tezos-node process should it fail for some reason.
The built in configuration implemented at runtime by the supervisor process is as follows:
tezos-node run --history-mode full --rpc-addr 0.0.0.0:8732 --cors-header='content-type' --cors-origin='*'
Modifications can be made by simply changing the start command in the ./supervisor/conf.d/supervisor-tezos.conf file.
The following command will build the image.
docker build --rm -f Dockerfile -t docker-tezos:latest .
# This assumes you built the image with the tag docker-tezos:latest
docker run --rm -d -P docker-tezos:latest
At this time, if the process (tezos-node) fails it will be restarted without requiring the container to be restarted. Persistent storage mount implemented and restarting node does not restart the syncing process
Questions, issues, deployment troubles, suggestions, etc., are all welcomed.