快速开发一个UI5 app并部署到 Docker容器
今天快速把一个UI5 app打包运行在Docker容器中。主要分为三步:
-
开发、测试运行
-
Docker文件、构建镜像
-
运行Docker
废话不多说,直接上code。
开发、测试运行
1.安装自动生成ui5的脚手架工具easy-ui5
npm install -g yo generator-easy-ui5
2.运行命令
yo
然后根据提示一步步往下即可。
3.运行:
npm start
4.添加了一个简单的Survey页面:
<mvc:View controllerName="com.myorg.myUI5App1.controller.FirstView"
xmlns="sap.m"
xmlns:l="sap.ui.layout"
xmlns:mvc="sap.ui.core.mvc">
<Panel>
<content>
<l:VerticalLayout class="sapUiContentPadding" width="100%">
<l:content>
<Label text="Label A (required)" labelFor="input-a"/>
<Input id="input-a" required="true"/>
<Label text="Label B (bold)" labelFor="input-b" design="Bold" />
<Input id="input-b"/>
<Label text="Label C (normal)" labelFor="input-c"/>