Skip to content

Commit

Permalink
Merge pull request #4426 from telefonicaid/hardening/doc-building
Browse files Browse the repository at this point in the history
FIX improve documentation about building Orion
  • Loading branch information
mapedraza authored Sep 11, 2023
2 parents ca1cae1 + dd2c914 commit 4953012
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 2 deletions.
2 changes: 2 additions & 0 deletions doc/manuals.jp/admin/build_source.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

Orion Context Broker のリファレンス配布は Debian 12 です。これは、broker を他のディストリビューションに組み込むことができないことを意味しません (実際には可能です)。このセクションには、Debian を使用していない人に役立つ可能性があるため、他のディストリビューションに組み込む方法に関する指示が含まれる場合があります。ただし、"公式にサポートされている" 唯一の手順は Debian 12 用の手順です。

公式以外のディストリビューションで Docker コンテナ・イメージをビルドする方法は、Docker ドキュメントの [3.1 非公式ディストリビューションでのビルド](../../../docker/README.jp.md#31-building-in-not-official-distributions)・セクションで確認できます。

## Debian 12 (正式サポート)

Orion Context Broker は、以下のライブラリをビルドの依存関係として使用します :
Expand Down
2 changes: 2 additions & 0 deletions doc/manuals/admin/build_source.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

Orion Context Broker reference distribution is Debian 12. This doesn't mean that the broker cannot be built in other distributions (actually, it can). This section may include indications on how to build in other distributions, just in the case it may help people that don't use Debian. However, note that the only "officially supported" procedure is the one for Debian 12.

You can also have a look to [3.1 Building in not official distributions](../../../docker/README.md#31-building-in-not-official-distributions) section in the Docker documentation to check how to build Docker containers images in distributions other than the official one.

## Debian 12 (officially supported)

The Orion Context Broker uses the following libraries as build dependencies:
Expand Down
10 changes: 9 additions & 1 deletion docker/README.jp.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ Orion Context Broker を試してみたいし、データベースについて

`docker build` コマンドのパラメータ `-t orion` は、イメージに名前を付けます。この名前は何でもかまいませんし、`-t org/fiware-orion` のような組織も含めています。この名前は後でイメージに基づいてコンテナを実行するために使用されます。

上記のステップ3には、2つの Dockerfile が用意されています: Debian ベースの公式のもの (`Dockefile` 自体) と、公式ではありませんが、Alpine をベース・ディストリビューションとして使用する場合の開始点として役立つ `Dockefile.alpine` です。
上記のステップ3には、2つの Dockerfile が用意されています: Debian ベースの公式のもの (`Dockefile` 自体) と、公式ではありませんが、[Alpine](https://www.alpinelinux.org/) をベース・ディストリビューションとして使用する場合の開始点として役立つ `Dockefile.alpine` です。

`docker build` のパラメータ `--build-arg` はビルド時の変数を設定できます。

Expand All @@ -136,6 +136,14 @@ Orion Context Broker を試してみたいし、データベースについて

イメージとビルド・プロセスの詳細については、[Docker のドキュメント](https://docs.docker.com/userguide/dockerimages/)を参照してください。

<a name="31-building-in-not-official-distributions"></a>
### 3.1 非公式ディストリビューションでのビルド

[インストール・ドキュメントの要件セクション](../doc/manuals.jp/admin/install.md#requirements)で説明されているように、Debian 12 は公式にサポートされている唯一のディストリビューションです。ただし、次のコマンドは、代替ディストリビューションをベースとする Docker コンテナを構築するためにテストされています。

* Ubuntu 22.04 LTS: `docker build -t orion-ubuntu22.04 --build-arg IMAGE_NAME=ubuntu --build-arg IMAGE_TAG=22.04 --build-arg CLEAN_DEV_TOOLS=0 .`
* Alpine 3.16.0: `docker build -t orion-alpine3.16 -f Dockerfile.alpine .`

## 4. その他の情報

Docker コンテナと Orion Context Broker を操作する際に留意すべき事項です。
Expand Down
10 changes: 9 additions & 1 deletion docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ Check that everything works with

The parameter `-t orion` in the `docker build` command gives the image a name. This name could be anything, or even include an organization like `-t org/fiware-orion`. This name is later used to run the container based on the image.

Two Dockerfiles are provided for step 3 above: the official one (`Dockefile` itself) based in Debian and `Dockefile.alpine`, which is not official but in can be useful as starting point if you want to use Alpine as base distribution.
Two Dockerfiles are provided for step 3 above: the official one (`Dockefile` itself) based in Debian and `Dockefile.alpine`, which is not official but in can be useful as starting point if you want to use [Alpine](https://www.alpinelinux.org/) as base distribution.

The parameter `--build-arg` in the `docker build` can be set build-time variables.

Expand All @@ -138,6 +138,14 @@ The parameter `--build-arg` in the `docker build` can be set build-time variable

If you want to know more about images and the building process you can find it in [Docker's documentation](https://docs.docker.com/userguide/dockerimages/).

### 3.1 Building in not official distributions

As explained in the [requirements section of the installation documentation](../doc/manuals/admin/install.md#requirements), Debian 12 is the only officially supported
distribution. However, the following commands have been tested to build Docker containers based in alternative distributions:

* Ubuntu 22.04 LTS: `docker build -t orion-ubuntu22.04 --build-arg IMAGE_NAME=ubuntu --build-arg IMAGE_TAG=22.04 --build-arg CLEAN_DEV_TOOLS=0 .`
* Alpine 3.16.0: `docker build -t orion-alpine3.16 -f Dockerfile.alpine .`

## 4. Other info

Things to keep in mind while working with docker containers and Orion Context Broker.
Expand Down

0 comments on commit 4953012

Please sign in to comment.