You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/source/build/index.rst
+79-57Lines changed: 79 additions & 57 deletions
Original file line number
Diff line number
Diff line change
@@ -52,45 +52,70 @@ Please choose your preferred platform below for a quick access:
52
52
Docker
53
53
^^^^^^
54
54
55
+
The idea of having up-to-date Docker images is to be able to run Iroha without the need to build it.
56
+
But now you have the option to run not only the ready-to-use images but also a special **Iroha Builder** within Docker, to build Iroha the way you would like it.
57
+
55
58
First of all, you need to install ``docker`` and ``docker-compose``. You can
.. note:: Please, use the latest available docker daemon and docker-compose.
60
63
61
-
Then you should clone the `Iroha repository <https://github.com/hyperledger/iroha>`_
62
-
to the directory of your choice:
64
+
Iroha Images
65
+
""""""""""""
66
+
67
+
You can find all the Iroha Docker Images by `searching the Docker Hub <https://hub.docker.com/search?q=hyperledger%2Firoha&type=image>`_ or on `GitHub <https://github.com/orgs/hyperledger/packages?repo_name=iroha>`_.
68
+
69
+
There are currently the following images:
70
+
71
+
- ``iroha`` -- general build of Iroha 1.x;
72
+
- ``iroha-burrow`` -- build that has Iroha 1.x with `Burrow integration <../integrations/index.html#hyperledger-burrow>`_;
73
+
- ``iroha-ursa`` -- build that has Iroha 1.x with `Ursa integration <../https://iroha.readthedocs.io/en/develop/integrations/index.html#hyperledger-ursa>`_;
74
+
- ``iroha2`` -- Iroha 2 build;
75
+
- ``iroha-builder`` -- a special image that allows you to run an Iroha builder within Docker.
76
+
77
+
.. hint:: You can read more on running the images in the `Quick Start Guide <../getting_started/index.html>`_.
78
+
79
+
Each image can be used with a respective tag indicating a branch from which the image is built.
80
+
All the available tags can be found on Docker Hub. `Here are all the tags <https://hub.docker.com/r/hyperledger/iroha/tags>`_ for ``iroha`` image.
81
+
82
+
For example, you can use ``iroha:develop`` for the development version of Iroha, or ``iroha:main`` for the release version. The same works with all the other images, too.
83
+
84
+
85
+
Iroha Builder
86
+
"""""""""""""
87
+
88
+
Iroha builder allows you to build Iroha with `any of the parameters available <#cmake-parameters>`_ for any other platform but to do it conveniently and securely in Docker.
.. hint:: ``--depth=1`` option allows us to download only latest commit and
69
-
save some time and bandwidth. If you want to get a full commit history, you
70
-
can omit this option.
98
+
On this step you will start and run the image in a container in an interactive mode. You can use any available tags, default one would be ``latest``, and developmnet tag is ``develop``. Note that you might need to perform some actions with ``sudo`` rights.
71
99
72
-
When it is done, you need to run the development environment. Run the
73
-
``scripts/run-iroha-dev.sh`` script:
100
+
2. When you are inside the container, clone Iroha repository:
.. hint:: Please make sure that Docker is running before executing the script.
80
-
MacOS users could find a Docker icon in system tray, Linux users can use
81
-
``systemctl start docker``
106
+
3. When Iroha is cloned, go into Iroha folder:
82
107
83
-
After you execute this script, the following things will happen:
108
+
.. code-block:: shell
109
+
110
+
cd iroha
84
111
85
-
#. The script will check whether you have containers with Iroha already running. Successful completion finishes with the new container shell.
112
+
4. Then run the script that will build all the necessary dependencies via vcpkg:
86
113
87
-
#. The script will download ``hyperledger/iroha:develop-build`` and ``postgres`` images. ``hyperledger/iroha:develop-build`` image contains all development dependencies and is based on top of ``ubuntu:20.04``. ``postgres`` image is required for starting and running Iroha.
114
+
.. code-block:: shell
88
115
89
-
#. Two containers are created and launched.
116
+
./vcpkg/build_iroha_deps.sh $PWD/vcpkg-build
90
117
91
-
#. The user is attached to the interactive environment for development and testing with ``iroha`` folder mounted from the host machine. Iroha folder is mounted to ``/opt/iroha`` in Docker container.
92
118
93
-
Now your are ready to build Iroha! Please go directly to `Building Iroha <#build-process>`_ section.
94
119
95
120
.. _linux-pre:
96
121
@@ -110,6 +135,12 @@ Use this code to install environment dependencies on Debian-based Linux distro.
110
135
build-essential ninja-build \
111
136
git ca-certificates tar curl unzip cmake
112
137
138
+
.. Important:: If you would like to use `Burrow integration <../integrations/burrow.html>`_ you will also need GO. Install it following the instructions on `the official website <https://golang.org/doc/install>`_ and then use the following command:
139
+
140
+
.. code-block:: shell
141
+
142
+
go get github.com/golang/protobuf/protoc-gen-go
143
+
113
144
.. note:: If you are willing to actively develop Iroha and to build shared
114
145
libraries, please consider installing the
115
146
`latest release <https://cmake.org/download/>`_ of CMake.
@@ -133,6 +164,12 @@ to install all environment dependencies with Homebrew:
.. Important:: If you would like to use `Burrow integration <../integrations/burrow.html>`_ you will also need GO. Install it following the instructions on `the official website <https://golang.org/doc/install>`_ and then use the following command:
168
+
169
+
.. code-block:: shell
170
+
171
+
go get github.com/golang/protobuf/protoc-gen-go
172
+
136
173
Now you are ready to `install Iroha dependencies <#installing-dependencies-with-vcpkg-dependency-manager>`_.
The cmake parameters such as ``-DUSE_BURROW=ON`` are exactly the parameters you can choose for your very special build. You can see the full list and description of these parameters `here <#cmake-parameters>`_.
0 commit comments