# Deterministic Builds

#### On this page

* [<mark style="color:blue;">Pre-requisites</mark>](#pre-requisites)
* [<mark style="color:blue;">Introduction</mark>](#introduction)
* [<mark style="color:blue;">Build with Docker</mark>](#build-with-docker)

Build the ICTechd  binary deterministically using Docker.

## Pre-requisites <mark style="color:blue;">#</mark> <a href="#pre-requisites" id="pre-requisites"></a>

* [<mark style="color:blue;">Install Docker</mark>](https://docs.docker.com/get-docker/)

## Introduction <mark style="color:blue;">#</mark> <a href="#introduction" id="introduction"></a>

The [<mark style="color:blue;">Tendermint rbuilder Docker image</mark>](https://github.com/tendermint/images/tree/master/rbuilder) provides a deterministic build environment that is used to build ICPlaza 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.

::: tip All the following instructions have been tested on *Ubuntu 18.04.2 LTS* with *Docker 20.10.2*. :::

## Build with Docker <mark style="color:blue;">#</mark> <a href="#build-with-docker" id="build-with-docker"></a>

Clone ICTech:

```bash
git clone git@github.com:tharsis/ICPlaza.git
```

Checkout the commit, branch, or release tag you want to build (eg `v0.4.0`):

```bash
cd ICPlaza/
git checkout v0.4.0
```

The buildsystem supports and produces binaries for the following architectures:

* **linux/amd64**

Run the following command to launch a build for all supported architectures:

```bash
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: ICPlazad
Version: 0.4.0
Commit: b7e46982d1dc2d4c34fcd3b52f1edfd2e589d370
Files:
 7594279acff34ff18ea9d896d217a6db  ICPlazad-0.4.0-linux-amd64
 c083e812acbfa7d6e02583386b371b93  ICPlazad-0.4.0.tar.gz
Checksums-Sha256:
 d087053050ce888c21d26e40869105163c5521cb5b291443710961ac0c892e81  ICPlazad-0.4.0-linux-amd64
 6ca3e5e40240f5e433088fd9b7370440f3f94116803934c21257e1c78fb9653d  ICPlazad-0.4.0.tar.gz
```

[<mark style="color:blue;">← HD Wallets</mark>](/icplaza-docs/chain-dev/resources/hd-wallets.md)

[<mark style="color:blue;">Service Providers →</mark>](/icplaza-docs/chain-dev/resources/service-providers.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ictech.gitbook.io/icplaza-docs/chain-dev/resources/deterministic-builds.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
