README_en.md 1.8 KB
Newer Older
C
c00565983 已提交
1 2 3 4
# OpenHarmony Docker Image

### Docker Image

C
c00565983 已提交
5
This document provides guidance on building the Docker image for mini- and small-system devices.
C
c00565983 已提交
6 7 8

The Docker image of OpenHarmony is hosted on [HUAWEI Cloud SWR](https://auth.huaweicloud.com/authui/login.html?service=https%3A%2F%2Fconsole.huaweicloud.com%2Fswr%2F%3Fregion%3Dcn-south-1%26cloud_route_state%3D%2Fapp%2Fwarehouse%2FwarehouseMangeDetail%2Fgoldensir%2Fopenharmony-docker%2Fopenharmony-docker%3Ftype%3DownImage&locale=en-us#/login). Using the Docker image will help simplify environment configurations needed for the building. The following table lists container-based options needed for building in the standalone Docker environment.

C
c00565983 已提交
9 10 11
| Docker Image Repository                                      | Tag     | Description                                               |
| :----------------------------------------------------------- | :------ | :-------------------------------------------------------- |
| `swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker` | `1.0.0` | The OpenHarmony build environment has been pre-installed. |
C
c00565983 已提交
12 13 14

### Usage

C
c00565983 已提交
15
 After downloading the OpenHarmony code, perform the steps below to access the Docker environment. 
C
c00565983 已提交
16 17 18

1. Obtain the Docker image.
     ```
C
c00565983 已提交
19
     docker pull swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker:1.0.0
C
c00565983 已提交
20 21 22
     ```
2. Go to the root directory of OpenHarmony code and run the following command to access the Docker build environment:
     ```
C
c00565983 已提交
23
     docker run -it -v $(pwd):/home/openharmony swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker:1.0.0
C
c00565983 已提交
24 25 26
     ```
3. Run the following script to start building for different platforms.
     ```
C
c00565983 已提交
27
     hb set # Press the Up or Down key to select the platform to build on, then press Enter.
C
c00565983 已提交
28 29
     hb build -f # Start building.
     ```