Using Dhive with Docker
There are multiple ways to use Dhive with Docker. If you want to run Dhive within a Docker setup and potentially connect the Docker container to other containerized, compatible blockchain binaries, refer to the guide on building a Docker image containing the Dhive binary. Alternatively, if you wish to generate a binary for use outside of Docker while ensuring the correct dependencies are used by building within a Docker container, proceed to the section on building the Dhive binary with Docker.
Note
The provided instructions have been tested on Ubuntu 18.04.2 LTS with Docker 20.10.2 and macOS 13.2.1 with Docker 20.10.22.
Prerequisites
Install Docker
General Setup
To build Dhive binaries with Docker, perform the following steps:
Clone the Dhive repository to your local machine:
Checkout the commit, branch, or release tag you wish to build:
Building a Docker Image Containing the Binary
To build a Docker image containing the Dhive binary, navigate to the cloned repository and run the following command in a terminal session:
This command creates an image named tharsishq/dhive
with the version tag latest
. The dhived
binary can now be executed within the container, for example, to check its version:
Building the Binary with Docker
It is possible to deterministically build the dhived
binary using Docker. Docker’s containerized environment enables the creation of a Dhive binary in an isolated setting.
Building the Image
Run the following command to initiate a build for all supported architectures (currently linux/amd64
):
The build system generates both the binaries and a deterministic build report within the artifacts
directory. The artifacts/build_report
file contains a list of the build artifacts along with their respective checksums, which can be used to verify the build’s integrity. Below is an example of the file’s contents:
Builder Image
The Tendermint builder Docker image provides a deterministic build environment for building Cosmos SDK applications, including Dhive. It ensures that the executables are genuinely compiled from the Git source, utilizing consistent, tested dependencies that are statically built into the executable.
Last updated
Was this helpful?