This action will force synchronization from WeBank/wecube-platform, which will overwrite any changes that you have made since you forked the repository, and can not be recovered!!!
Synchronous operation will process in the background and will refresh the page when finishing processing. Please be patient.
准备一台linux主机,为加快编译速度, 资源配置建议4核8GB或以上;
操作系统版本建议为ubuntu16.04以上或centos7.3以上;
网络需要可通外网(需从外网下载安装软件);
安装Git
yum install -y git
安装docker1.17.03.x以上
通过github拉取代码
切换到本地仓库目录, 执行命令
cd /data
git clone https://github.com/WeBankPartners/wecube-platform.git
根据提示输入github账号密码, 即可拉取代码到本地。 拉取完成后, 可以在本地目录上看到wecube-platform目录, 进入目录,结构如下:
编译
maven配置文件在build目录下的maven_setting.xml文件,默认配置如下:
编译过程中会从外网拉取maven包和npm包,如果有更快的maven源,可修改该文件中的配置。
在代码根目录下执行
make build
等待编译完成,如下图:
制作镜像
编译完成后,在代码根目录下执行
make image
如下图:
将制作WeCube的运行镜像。
如果还需要制作WeCube的数据库镜像,执行以下命令:
cd build/db
chmod +x build-image.sh
./build-image.sh
镜像制作完成后, 执行命令:
docker images
可查看镜像列表
镜像保存
执行以下命令将镜像保存到linux目录:
docker save -o wecube-platform.tar wecube-platform
docker save -o wecube-db.tar wecube-db
可在当前目录下看到保存成功的文件,将镜像文件发送到部署机器, 即可开始部署。 也可以将镜像上传到远程镜像仓库, 部署时从远程镜像仓库拉取。
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。