Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
eb74621a
D
Docs
项目概览
OpenHarmony
/
Docs
1 年多 前同步成功
通知
159
Star
292
Fork
28
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
Docs
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
eb74621a
编写于
9月 18, 2021
作者:
C
conglin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update standard docker
Signed-off-by:
N
conglin
<
conglin8023@126.com
>
上级
1a9b689b
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
3 addition
and
161 deletion
+3
-161
docker/standard/build.sh
docker/standard/build.sh
+1
-1
docker/standard/dockerfile
docker/standard/dockerfile
+2
-7
docker/standard/prebuilts_download.sh
docker/standard/prebuilts_download.sh
+0
-67
docker/standard/prepare.sh
docker/standard/prepare.sh
+0
-86
未找到文件。
docker/standard/build.sh
浏览文件 @
eb74621a
...
...
@@ -13,4 +13,4 @@
#!/bin/sh
docker build
-t
openharmony-docker-standard:0.0.
3
.
docker build
-t
openharmony-docker-standard:0.0.
4
.
docker/standard/dockerfile
浏览文件 @
eb74621a
...
...
@@ -17,14 +17,11 @@ WORKDIR /home/openharmony
ARG
DEBIAN_FRONTEND=noninteractive
ARG
PREBUILTS_DIR=/home/prebuilts
ARG
HOME_TOOLS=/home/tools
ARG
HOME_SCRIPTS=/home/scripts
RUN
mv
/etc/apt/sources.list /etc/apt/sources.list.bak
COPY
sources.list /etc/apt
COPY
prebuilts_download.sh prepare.sh $HOME_SCRIPTS/
RUN
apt-get update
\
&&
apt-get
install
-y
\
apt-utils
\
...
...
@@ -85,9 +82,10 @@ RUN apt-get update \
libc6-dev-i386
\
lib32z-dev
\
openjdk-8-jdk
\
ruby
\
&&
rm
-rf
/bin/sh
\
&&
ln
-s
/bin/bash /bin/sh
\
&&
mkdir
-p
$PREBUILTS_DIR
/prebuilts
$HOME_TOOLS
$HOME_SCRIPTS
&&
mkdir
-p
$PREBUILTS_DIR
/prebuilts
$HOME_TOOLS
RUN
wget
-P
$HOME_TOOLS
https://mirrors.huaweicloud.com/nodejs/v12.18.4/node-v12.18.4-linux-x64.tar.gz
\
&&
wget
-P
$HOME_TOOLS
https://mirrors.huaweicloud.com/nodejs/v12.18.4/node-v12.18.4-darwin-x64.tar.gz
\
...
...
@@ -98,7 +96,4 @@ RUN wget -P $HOME_TOOLS https://mirrors.huaweicloud.com/nodejs/v12.18.4/node-v12
&&
export
PATH
=
$PATH
:
$PREBUILTS_DIR
/prebuilts/node-v12.18.4-linux-x64/bin
\
&&
export
PATH
=
$PATH
:
$PREBUILTS_DIR
/prebuilts/hc-gen
\
&&
rm
-rf
$HOME_TOOLS
\
&&
chmod
-R
777
$HOME_SCRIPTS
/
*
.sh
\
&&
$HOME_SCRIPTS
/prebuilts_download.sh
\
&&
rm
-rf
/tmp/prebuilts
\
&&
npm
install
-g
@ohos/hpm-cli
--registry
https://registry.npm.taobao.org
docker/standard/prebuilts_download.sh
已删除
100755 → 0
浏览文件 @
1a9b689b
# Copyright
(
c
)
2020 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#!/bin/bash
# 代码下载目录
code_dir
=
/home/prebuilts
# 二进制所在目录,用于临时存放二进制,二进制整个大小约10G,请确保有足够的空间
bin_dir
=
/tmp/prebuilts
# 二进制关系
copy_config
=
"""
prebuilts/cmake,https://repo.huaweicloud.com/harmonyos/compiler/cmake/3.16.5/darwin/cmake-darwin-x86-3.16.5.tar.gz
prebuilts/cmake,https://repo.huaweicloud.com/harmonyos/compiler/cmake/3.16.5/linux/cmake-linux-x86-3.16.5.tar.gz
prebuilts/cmake,https://repo.huaweicloud.com/harmonyos/compiler/cmake/3.16.5/windows/cmake-windows-x86-3.16.5.tar.gz
prebuilts/build-tools/darwin-x86/bin,https://repo.huaweicloud.com/harmonyos/compiler/gn/1717/darwin/gn-darwin-x86-1717.tar.gz
prebuilts/build-tools/linux-x86/bin,https://repo.huaweicloud.com/harmonyos/compiler/gn/1717/linux/gn-linux-x86-1717.tar.gz
prebuilts/build-tools/darwin-x86/bin,https://repo.huaweicloud.com/harmonyos/compiler/ninja/1.10.1/darwin/ninja-darwin-x86-1.10.1.tar.gz
prebuilts/build-tools/linux-x86/bin,https://repo.huaweicloud.com/harmonyos/compiler/ninja/1.10.1/linux/ninja-linux-x86-1.10.1.tar.gz
prebuilts/python,https://repo.huaweicloud.com/harmonyos/compiler/python/3.8.5/darwin/python-darwin-x86-3.8.5.tar.gz
prebuilts/python,https://repo.huaweicloud.com/harmonyos/compiler/python/3.8.5/linux/python-linux-x86-3.8.5.tar.gz
prebuilts/mingw-w64/ohos/linux-x86_64,https://repo.huaweicloud.com/harmonyos/compiler/mingw-w64/7.0.0/clang-mingw.tar.gz
prebuilts,https://repo.huaweicloud.com/harmonyos/compiler/hc-gen/0.65/linux/hc-gen-0.65-linux.tar
prebuilts/gcc/linux-x86/arm,https://repo.huaweicloud.com/harmonyos/compiler/prebuilts_gcc_linux-x86_arm_gcc-linaro-7.5.0-arm-linux-gnueabi/1.0/prebuilts_gcc_linux-x86_arm_gcc-linaro-7.5.0-arm-linux-gnueabi.tar.gz
prebuilts/gcc/linux-x86/aarch64,https://repo.huaweicloud.com/harmonyos/compiler/prebuilts_gcc_linux-x86_arm_gcc-linaro-7.5.0-arm-linux-gnueabi/1.0/gcc-linaro-7.5.0-2019.12-x86_64-aarch64-linux-gnu.tar.xz
prebuilts/sdk/js-loader/build-tools,https://repo.huaweicloud.com/harmonyos/compiler/ace-loader/1.0/ace-loader.tar.gz
prebuilts/clang/ohos/linux-x86_64,https://repo.huaweicloud.com/harmonyos/compiler/clang/10.0.1-69957/linux/clang-69957-linux-x86_64.tar.bz2
prebuilts/build-tools/common,https://repo.huaweicloud.com/harmonyos/compiler/restool/1.023-c/restool.tar.gz
"""
if
[
!
-d
"
${
bin_dir
}
"
]
;
then
mkdir
-p
"
${
bin_dir
}
"
fi
for
i
in
`
echo
${
copy_config
}
`
do
unzip_dir
=
`
echo
$i
|awk
-F
','
'{print $1}'
`
huaweicloud_url
=
`
echo
$i
|awk
-F
','
'{print $2}'
`
md5_huaweicloud_url
=
`
echo
${
huaweicloud_url
}
|md5sum|awk
'{print $1}'
`
bin_file
=
`
basename
${
huaweicloud_url
}
`
bin_file_suffix
=
${
bin_file
#*.
}
#huaweicloud_file_name=`echo ${huaweicloud_url}|awk -F '/' '{print $NF}'`
if
[
!
-d
"
${
code_dir
}
/
${
unzip_dir
}
"
]
;
then
mkdir
-p
"
${
code_dir
}
/
${
unzip_dir
}
"
fi
if
[
!
-f
"
${
bin_dir
}
/
${
md5_huaweicloud_url
}
.
${
bin_file_suffix
}
"
]
;
then
# 代理不需要鉴权: wget -P ${bin_dir} -e "https_proxy=http://domain.com:port" ${huaweicloud_url}
# 代理需要鉴权(账号密码特殊字符均需要URL转义): wget -P ${bin_dir} -e "https_proxy=http://username:password@domain.com:port" ${huaweicloud_url}
# 不需要代理
wget
-O
${
bin_dir
}
/
${
md5_huaweicloud_url
}
.
${
bin_file_suffix
}
${
huaweicloud_url
}
fi
if
[
"X
${
bin_file_suffix
:0-3
}
"
=
"Xzip"
]
;
then
unzip
"
${
bin_dir
}
/
${
md5_huaweicloud_url
}
.
${
bin_file_suffix
}
"
-d
"
${
code_dir
}
/
${
unzip_dir
}
/"
elif
[
"X
${
bin_file_suffix
:0-6
}
"
=
"Xtar.gz"
]
;
then
tar
-xvzf
"
${
bin_dir
}
/
${
md5_huaweicloud_url
}
.
${
bin_file_suffix
}
"
-C
"
${
code_dir
}
/
${
unzip_dir
}
"
else
tar
-xvf
"
${
bin_dir
}
/
${
md5_huaweicloud_url
}
.
${
bin_file_suffix
}
"
-C
"
${
code_dir
}
/
${
unzip_dir
}
"
fi
done
docker/standard/prepare.sh
已删除
100755 → 0
浏览文件 @
1a9b689b
# Copyright (c) 2020 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#!/bin/bash
WORKDIR
=
/home/openharmony
TOOLSDIR
=
/home/prebuilts/prebuilts
rm
-rf
/usr/bin/python
ln
-s
/usr/bin/python2.7 /usr/bin/python
if
[[
-d
$WORKDIR
/third_party/jsframework
]]
;
then
echo
copy jsframework node_modules
cd
$WORKDIR
/third_party/jsframework
npm
install
--registry
https://registry.npm.taobao.org
fi
if
[[
-d
$TOOLSDIR
/build-tools/common/js-framework
]]
;
then
rm
-rf
$TOOLSDIR
/build-tools/common/js-framework
fi
mkdir
-p
$TOOLSDIR
/build-tools/common/js-framework
cp
-r
$WORKDIR
/third_party/jsframework/node_modules
$TOOLSDIR
/build-tools/common/js-framework
if
[[
-d
$TOOLSDIR
/build-tools/common/nodejs
]]
;
then
rm
-rf
$TOOLSDIR
/build-tools/common/nodejs
fi
mkdir
-p
$TOOLSDIR
/build-tools/common/nodejs
cp
-r
$TOOLSDIR
/node-v12.18.4-linux-x64
$TOOLSDIR
/build-tools/common/nodejs
cp
-r
$TOOLSDIR
/node-v12.18.4-darwin-x64
$TOOLSDIR
/build-tools/common/nodejs
if
[[
-h
$WORKDIR
/prebuilts/cmake
]]
;
then
rm
$WORKDIR
/prebuilts/cmake
fi
echo link
cmake
ln
-s
$TOOLSDIR
/cmake
$WORKDIR
/prebuilts/cmake
if
[[
-h
$WORKDIR
/prebuilts/build-tools
]]
;
then
rm
$WORKDIR
/prebuilts/build-tools
fi
echo link
build-tools
ln
-s
$TOOLSDIR
/build-tools
$WORKDIR
/prebuilts/build-tools
if
[[
-h
$WORKDIR
/prebuilts/python
]]
;
then
rm
$WORKDIR
/prebuilts/python
fi
echo link
python
ln
-s
$TOOLSDIR
/python
$WORKDIR
/prebuilts/python
if
[[
-h
$WORKDIR
/prebuilts/mingw-w64
]]
;
then
rm
$WORKDIR
/prebuilts/mingw-w64
fi
echo link
mingw-w64
ln
-s
$TOOLSDIR
/mingw-w64
$WORKDIR
/prebuilts/mingw-w64
mv
$TOOLSDIR
/clang/ohos/linux-x86_64/clang-69957
$TOOLSDIR
/clang/ohos/linux-x86_64/llvm
if
[[
-h
$WORKDIR
/prebuilts/clang
]]
;
then
rm
$WORKDIR
/prebuilts/clang
fi
echo link
clang
ln
-snf
10.0.1
$TOOLSDIR
/clang/ohos/linux-x86_64/llvm/lib/clang/current
ln
-s
$TOOLSDIR
/clang
$WORKDIR
/prebuilts/clang
mv
$TOOLSDIR
/gcc/linux-x86/arm/prebuilts_gcc_linux-x86_arm_gcc-linaro-7.5.0-arm-linux-gnueabi
$TOOLSDIR
/gcc/linux-x86/arm/gcc-linaro-7.5.0-arm-linux-gnueabi
if
[[
-h
$WORKDIR
/prebuilts/gcc
]]
;
then
rm
$WORKDIR
/prebuilts/gcc
fi
echo link
gcc
ln
-s
$TOOLSDIR
/gcc
$WORKDIR
/prebuilts/gcc
if
[[
-h
$WORKDIR
/prebuilts/sdk
]]
;
then
rm
$WORKDIR
/prebuilts/sdk
fi
echo link
sdk
ln
-s
$TOOLSDIR
/sdk
$WORKDIR
/prebuilts/sdk
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录