Cosvm using Docker
There are multiple ways to use CosVM with Docker. If you want to run CosVM inside a Docker setup and possibly connect the Docker container to other containerized compatible blockchain binaries, check out the guide on building a Docker image containing the CosVMbinary. If you instead want to generate a binary for use outside of Docker, but want to ensure the correct dependencies are used by building the binary inside a Docker container, then go ahead to the section on building the CosVM binary with Docker
Step by step tutorial:
Install Docker Ensure Docker is installed on your machine.
Clone the CosVM repository:
Clone the CosVM repository to your local machine.
Example:
git clone [email protected]/CosVM/CosVM.git
Checkout the specific version/tag:
Navigate to the cloned repository and switch to the desired commit, branch, or release tag
cd CosVM
git checkout v11.0.2
Building a Docker Image Containing the CosVM Binary:
To build a Docker image containing the CosVM binary:
Step into the cloned repository:
Open a terminal session and navigate to the CosVM directory.
Run the following command: Execute the command below to create an image with the CosVM binary.
make build-docker
This will create an image with the name tharsishq/cvm and the version tag latest. Now it is possible to run the cvmd binary in the container, e.g. evaluating its version:
docker run -it --rm tharsishq/cosvm:latest cosVM version
Building the CosVM Binary with Docker:
It is possible to build the CosVMbinary deterministically using Docker:
Building the Image:
Run the following command to launch a build for all supported architectures (currently linux/amd64):
make distclean build-reproducible
The build system generates both the binaries and a deterministic build report in the artifacts
directory. The artifacts/build_report
file contains the list of build artifacts and their respective checksums, useful for verifying build integrity.
App: cvmd
Version: 11.0.2
Commit: 8eeeac7ae42a5b2695fea7f56868f3c6e9bc2378
Files:
6b5939adfd9a8ce964d78fcaab16091a cvmd-11.0.2-linux-amd64
ac503925c535ddb8ee0fbebbb96d0eb9 cvmd-11.0.2.tar.gz
Checksums-Sha256:
0857d59c285a87b7d354aa6d566db90c56663d938a88d41d35415da490708aea cvmd-11.0.2-linux-amd64
5005814fc34abc02d7e30dcfbe67e363c1b593efb774e0c97ebb7ec713baf306 cvmd-11.0.2.tar.gz
The Tendermint builder Docker image provides a deterministic build environment used for CosVM applications. It ensures that the executables are built from the git source and employs tested dependencies, statically built into the executable.
Now that you've built the CosVM binary, whether for local use or in a Docker container, you'll find information on running a node instance in the subsequent section on setting up a local network.
Remember to adjust commands and paths according to your actual CosVM repository and Docker configuration.
Always comply with licensing, permissions, and repository access when using and distributing cosVM or its related components.
Last updated