LogoLogo
  • Technical Architecture
  • LagomChain CLI
    • Configuration
    • Working With Docker
    • Single Node
    • Multi Node
    • Alternative Databases
    • CLI Commands
    • Drafting a proposal
  • Concepts
    • Accounts
    • EIP-155: Replay Protection
    • Chain ID
    • Encoding
    • Gas and Fees
    • IBC Relayers
    • Key Management
    • Keyring
    • State Export/Imort
    • Multisig
    • Pending State
    • Signing
    • Token
    • Transactions
  • Modules
    • epochs
    • erc20
    • evm
    • feemarket
    • inflation
    • vesting
  • Module Accounts
  • Bugs
  • IBC Channels
  • Security Overview
    • Audits
    • Simple Arrangement for Funding Upload (SAFU)
  • Metrics
  • Frequently Asked Questions
Powered by GitBook
On this page
  • Prerequisites​
  • General Setup​
  • Building A Docker Image Containing The Binary​
  • Building The Binary With Docker​
  1. LagomChain CLI

Working With Docker

There are multiple ways to use LagomChain with Docker. If you want to run LagomChain 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 LagomChain binary. 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 LagomChain binary with Docker.

note

The given 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​

In order to build LagomChain binaries with Docker, it is necessary to

  • clone the LagomChain repository to your local machine (e.g. git clone [email protected]/LagomChain/LagomChain.git)

  • checkout the commit, branch, or release tag you want to build (e.g. git checkout v11.0.2)

Building A Docker Image Containing The Binary​

To build a Docker image, that contains the LagomChain binary, step into the cloned repository and run the following command in a terminal session:

This will create an image with the name tharsishq/lagomchain and the version tag latest. Now it is possible to run the lagomd binary in the container, e.g. evaluating its version:

docker run -it --rm tharsishq/lagomchain:latest lagomd version

Building The Binary With Docker​

It is possible to build the lagomd binary deterministically using Docker. The container system that Docker provides offers the ability to create an instance of the LagomChain binary in an isolated environment.

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 deterministic build report in the artifacts directory. The artifacts/build_report file contains the list of the build artifacts and their respective checksums, and can be used to verify build sanity. An example of its contents follows:

App: lagomd
Version: 11.0.2
Commit: 8eeeac7ae42a5b2695fea7f56868f3c6e9bc2378
Files:
 6b5939adfd9a8ce964d78fcaab16091a  lagomd-11.0.2-linux-amd64
 ac503925c535ddb8ee0fbebbb96d0eb9  lagomd-11.0.2.tar.gz
Checksums-Sha256:
 0857d59c285a87b7d354aa6d566db90c56663d938a88d41d35415da490708aea  lagomd-11.0.2-linux-amd64
 5005814fc34abc02d7e30dcfbe67e363c1b593efb774e0c97ebb7ec713baf306  lagomd-11.0.2.tar.gz

Builder Image​

The Tendermint builder Docker image provides a deterministic build environment that is used to build Cosmos SDK applications. It provides a way to be reasonably sure that the executables are really built from the git source. It also makes sure that the same, tested dependencies are used and statically built into the executable.


Now that you have built the LagomChain binary, either for local use or in a Docker container, you'll find information to run a node instance in the following section on setting up a local network.

PreviousConfigurationNextSingle Node

Last updated 3 months ago