| `swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker` | `0.0.5` | The HarmonyOSOpenHarmony build environment has been pre-installed. This repository applies to Mini-System Devices (reference memory ≥ 128 KB) and Small-System Devices (reference memory ≥ 1 MB). |
| `swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker` | `0.0.6` | The OpenHarmony build environment has been pre-installed. This repository applies to Mini-System Devices (reference memory ≥ 128 KB) and Small-System Devices (reference memory ≥ 1 MB). |
### Usage
After configuring the development environments, perform the steps below to access the Docker environment. The following steps use Ubuntu as an example (Windows is also supported).
#### **Method 1: Obtaining the Docker image from HuaweiCloud SWR**:
After configuring the development environments, perform the steps below to access the Docker environment.
2. Go to the root directory of OpenHarmony code and run the following command to access the Docker build environment:
...
...
@@ -90,43 +89,13 @@ The Docker image of OpenHarmony is hosted on [HUAWEI CLOUD SWR](https://console
Run the following command in Ubuntu:
```
docker run -it -v $(pwd):/home/openharmony swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker:0.0.5
```
Run the following command in Windows \(assuming that the source code directory is **D:\\OpenHarmony**\):
```
docker run -it -v D:\OpenHarmony:/home/openharmony swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker:0.0.5
```
**Method 2: Using the Dockerfile to Build a Local Docker Image**
1. Obtain the Dockerfile script for a local Docker image.
```
git clone https://gitee.com/openharmony/docs.git
```
2. Go to the directory of the Dockerfile code and run the following command to build the Docker image:
```
cd docs/docker
./build.sh
```
3. Go to the root directory of OpenHarmony code and run the following command to access the Docker build environment:
Run the following command in Ubuntu:
```
docker run -it -v $(pwd):/home/openharmony swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker:0.0.5
docker run -it -v $(pwd):/home/openharmony swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker:0.0.6
```
Run the following command in Windows \(assuming that the source code directory is **D:\\OpenHarmony**\):
```
docker run -it -v D:\OpenHarmony:/home/openharmony swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker:0.0.5
docker run -it -v D:\OpenHarmony:/home/openharmony swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker:0.0.6
```
...
...
@@ -164,8 +133,6 @@ hb set
### Setting Up the Docker Environment for Standard-System Devices \(reference memory ≥ 128 MB\)<a name="section13585262391"></a>
**Method 1: Obtaining the Docker image from HUAWEI CLOUD SWR**
1. Obtain the Docker image.
```
...
...
@@ -179,28 +146,6 @@ hb set
```
**Method 2: Using the Dockerfile to Build a Local Docker Image**
1. Obtain the Dockerfile script for a local Docker image.
```
git clone https://gitee.com/openharmony/docs.git
```
2. Go to the directory of the Dockerfile code and run the following command to build the Docker image:
```
cd docs/docker/standard
./build.sh
```
3. Go to the root directory of OpenHarmony code and run the following command to access the Docker build environment:
```
docker run -it -v $(pwd):/home/openharmony openharmony-docker-standard:0.0.7
```
### Building for Standard-System Devices \(reference memory ≥ 128 MB\)<a name="section193711513406"></a>
Run the following script to start building for standard-system devices \(reference memory ≥ 128 MB\).
...
...
@@ -209,7 +154,7 @@ Run the following script to start building for standard-system devices \(referen
./build.sh --product-name {product_name} --ccache
```
**product\_name** indicates the platform supported by the current distribution, for example, Hi3516D V300 and RK3568.
**product\_name** indicates the platform supported by the current distribution, for example, Hi3516DV300 and rk3568.
Files generated during building are stored in the **out/{device_name}/** directory, and the generated image is stored in the **out/{device_name}/packages/phone/images/** directory.
@@ -61,8 +61,6 @@ By default, the downloaded prebuilts binary file is stored in **OpenHarmony\_2.
## Obtaining the Docker Environment<a name="section181431248132513"></a>
**Method 1: Obtaining the Docker image from HUAWEI CLOUD SWR**
1. Obtain the Docker image.
```
...
...
@@ -76,28 +74,6 @@ By default, the downloaded prebuilts binary file is stored in **OpenHarmony\_2.
```
**Method 2: Using the Dockerfile to Build a Local Docker Image**
1. Obtain the Dockerfile script for a local Docker image.
```
git clone https://gitee.com/openharmony/docs.git
```
2. Go to the directory of the Dockerfile code and run the following command to build the Docker image:
```
cd docs/docker/standard
./build.sh
```
3. Go to the root directory of source code and run the following command to access the Docker build environment:
```
docker run -it -v $(pwd):/home/openharmony openharmony-docker-standard:0.0.7
```
## Building Source Code<a name="section92391739152318"></a>
1. Run the following script to start building for standard-system devices \(reference memory ≥ 128 MB\).
...
...
@@ -106,7 +82,7 @@ By default, the downloaded prebuilts binary file is stored in **OpenHarmony\_2.
./build.sh --product-name {product_name} --ccache
```
**product\_name** indicates the platform supported by the current distribution, for example, Hi3516DV300, rk3568.
**product\_name** indicates the platform supported by the current distribution, for example, Hi3516DV300, rk3568.
Files generated during building are stored in the **out/{device_name}/** directory, and the generated image is stored in the **out/{device_name}/packages/phone/images/** directory.