Note: to allow for the command to connect to a database running on the localhost, you'll need to:
- set
DATABASE_HOSTNAME=host.docker.internalon MacOS - include the
--network=hostflag on Linux (withDATABASE_HOSTNAME=localhost)
For more information, see docker/for-linux#264
Dockerfile for populating storage diffs in db to be transformed by execute.
From project root directory:
docker build -f dockerfiles/extract_diffs/Dockerfile . -t extract_diffs:latest
Against statediffing Geth pubsub:
docker run -e DATABASE_USER=user -e DATABASE_PASSWORD=password -e DATABASE_HOSTNAME=host -e DATABASE_PORT=port -e DATABASE_NAME=name -e CLIENT_IPCPATH=path -e STORAGEDIFFS_SOURCE=geth -it extract_diffs:latest
Against CSV:
docker run -e DATABASE_USER=user -e DATABASE_PASSWORD=password -e DATABASE_HOSTNAME=host -e DATABASE_PORT=port -e DATABASE_NAME=name -e CLIENT_IPCPATH=path -e FILESYSTEM_STORAGEDIFFSPATH=/data/<csv_filename> -v <csv_filepath>:/data -it extract_diffs:latest
Dockerfile for running headerSync in a container
From project root directory:
docker build -f dockerfiles/header_sync/Dockerfile . -t header_sync:latest
You can also use the dockerbuild make task for any image in dockerfiles with make dockerbuild IMAGE=header_sync
docker run -e DATABASE_USER=user -e DATABASE_PASSWORD=password -e DATABASE_HOSTNAME=host -e DATABASE_PORT=port -e DATABASE_NAME=name -e STARTING_BLOCK_NUMBER=0 -e CLIENT_IPCPATH=path -it header_sync:latest
header_sync had a make task to run it make header_sync CLIENT_IPCPATH=path NAME=database_name. It's meant for development, not production.
Dockerfile for resetting the headers.check_count to zero in the database for the given header, so that the execute command
will transform the associated events. This is useful in case an event log is missing.
From project root directory:
docker build -f dockerfiles/reset_header_check_count/Dockerfile . -t reset_header_check_count:latest
docker run -e CLIENT_IPCPATH=ipc_path -e DATABASE_USER=user -e DATABASE_PASSWORD=password -e DATABASE_HOSTNAME=host -e DATABASE_PORT=port -e DATABASE_NAME=name -e RESET_HEADER_COUNT_BLOCK_NUMBER=block-number -it reset_header_check_count:latest
Notes:
HEADER_BLOCK_NUMBERvariable is required