Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CFFP-HB
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chao Sun
CFFP-HB
Commits
7bed171a
Commit
7bed171a
authored
Aug 04, 2025
by
zhangxingmin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
push
parent
2bc31c5f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
11 deletions
+16
-11
Dockerfile
+16
-11
No files found.
Dockerfile
View file @
7bed171a
...
@@ -47,19 +47,11 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
...
@@ -47,19 +47,11 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
RUN
curl
-fsSL
https://deb.nodesource.com/setup_20.x | bash -
&&
\
RUN
curl
-fsSL
https://deb.nodesource.com/setup_20.x | bash -
&&
\
apt-get install
-y
nodejs
apt-get install
-y
nodejs
# 安装 HBuilderX
ARG
HBUILDER_VERSION=3.8.12
RUN
wget
-O
HBuilderX.tar.gz https://download1.dcloud.net.cn/download/HBuilderX.
${
HBUILDER_VERSION
}
.linux-x64.tar.gz
&&
\
tar
-xzf
HBuilderX.tar.gz
-C
/opt
&&
\
rm HBuilderX.tar.gz
&&
\
chmod 755 /opt/HBuilderX/cli
&&
\
chmod 755 /opt/HBuilderX/HBuilderX
# 设置工作目录
# 设置工作目录
WORKDIR
/app
WORKDIR
/app
# 复制项目文件
# 复制项目文件
#COPY jenkins
.
COPY
.
.
# 配置 npm 镜像源
# 配置 npm 镜像源
RUN
npm config
set
registry https://registry.npmmirror.com
&&
\
RUN
npm config
set
registry https://registry.npmmirror.com
&&
\
...
@@ -69,8 +61,21 @@ RUN npm config set registry https://registry.npmmirror.com && \
...
@@ -69,8 +61,21 @@ RUN npm config set registry https://registry.npmmirror.com && \
# 安装项目依赖
# 安装项目依赖
RUN
npm install
--no-audit
RUN
npm install
--no-audit
# 登录 HBuilderX (注意:实际使用时请使用更安全的方式管理凭证)
# 从宿主机复制已安装的 HBuilderX
RUN
/opt/HBuilderX/cli user login
--username
15026705202
--password
Wo7320017
COPY
--from=host /var/jenkins_home/HBuilderX /opt/HBuilderX
# 修复 HBuilderX 权限
RUN
chmod 755 /opt/HBuilderX/cli
&&
\
chmod 755 /opt/HBuilderX/HBuilderX
&&
\
find /opt/HBuilderX
-name
"lib*.so*"
-exec
chmod 755
{}
\;
# 设置 Qt 库路径
ENV
LD_LIBRARY_PATH=/opt/HBuilderX:$LD_LIBRARY_PATH
# 登录 HBuilderX
ARG
HB_USERNAME
ARG
HB_PASSWORD
RUN
/opt/HBuilderX/cli user login
--username
"
$HB_USERNAME
"
--password
"
$HB_PASSWORD
"
# 构建项目
# 构建项目
RUN
/opt/HBuilderX/cli publish
--platform
h5
--project
.
--output
dist
RUN
/opt/HBuilderX/cli publish
--platform
h5
--project
.
--output
dist
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment