RyanHendricks / docker-tezos

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Docker-Tezos

Dockerized Tezos Node Full or Archive History Mode Optional Bootstrapping for Full Node


MicroBadger Version CircleCI (all branches) Docker Pulls

MicroBadger Layers (latest) MicroBadger Image-Size (latest)

Codacy grade


Configuration

Simply build and run the container specifying the following ENV variables with the desired options

BOOTSTRAP

  • TRUE
  • FALSE NODE_TYPE
  • full
  • archive

Background

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.

Prerequisites

  • Docker

Quick Start

The image can be run without any configuration and defaults to mainnet.

docker  run --rm -d -P ryanhendricks/docker-tezos:latest

Supervisor

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.

Configuration

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.

Build

The following command will build the image.

docker build --rm -f Dockerfile -t docker-tezos:latest .

Running

Standalone Docker

# This assumes you built the image with the tag docker-tezos:latest
docker  run --rm -d -P docker-tezos:latest

NOTES

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

Issues

Questions, issues, deployment troubles, suggestions, etc., are all welcomed.

Contributing

PRs Welcome

Contributors

Keybase PGP

License

GitHub

About

License:MIT License


Languages

Language:Shell 83.7%Language:Dockerfile 16.3%