Skip to content

Commit 9bc1200

Browse files
committed
add Dockerfile for build from linux
1 parent 7e6cd65 commit 9bc1200

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

Dockerfile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
FROM ubuntu:24.04
2+
3+
# Install dependencies
4+
RUN apt-get update && \
5+
apt install -y build-essential cmake curl wget unzip python3 libncurses-dev \
6+
git flex bison bash make autoconf libcurl4-openssl-dev tcl \
7+
gettext zip pigz meson
8+
9+
ENV OHOS_SDK_RELEASE_VERSION=5.1.0
10+
11+
# Install OHOS SDK
12+
RUN curl -OL https://repo.huaweicloud.com/openharmony/os/${OHOS_SDK_RELEASE_VERSION}-Release/ohos-sdk-windows_linux-public.tar.gz && \
13+
tar -xvf ohos-sdk-windows_linux-public.tar.gz -C /opt && \
14+
rm ohos-sdk-windows_linux-public.tar.gz && \
15+
rm -rf /opt/ohos-sdk/{ohos,windows} && \
16+
cd /opt/ohos-sdk/linux && \
17+
for file in $(find . -type f); do \
18+
unzip $file && rm $file; \
19+
done
20+
21+
# Set environment variables
22+
ENV OHOS_SDK_HOME=/opt/ohos-sdk/linux
23+
24+
CMD /bin/bash

0 commit comments

Comments
 (0)