You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

41 lines
975 B

[appendix]
= 平台 gradle 任务
== 将 asciidoc 文档转换成 html
[source,bash]
----
# 将 asciidoc 文档转换成 html 并复制到指定的目录(通过 asciidoc_deploy_dir 属性设置目录)
gradle doc # 不拷贝自定义资源
gradle doc -DdocResource=true # 拷贝自定义资源(当资源文件发生改变后执行此命令,以便更新相关资源,如:图片等)
----
== 生成 docker 镜像
在应用启动模块的 build.gradle 文件中添加以下属性:
=== 设置启动模块构建属性
[source,bash]
----
jibBuildTar.enabled =true
----
=== 构建镜像
执行以下命令,生成 docker 镜像,生成后的镜像 tar 文件位于 build/libs 目录中
[source,bash]
----
gradle jibBuildTar
----
=== 将镜像加载到 docker 中
[source,bash]
----
docker load --input 镜像文件.tar
----
=== 启动容器
[source,bash]
----
docker run \
--name app.platform \
-d \
-p 8080:8080 \
app.platform:11.0.0
----