更新时间:2022-07-05 GMT+08:00
制作镜像包
将jar文件打包成镜像文件上,请参照制作镜像包或插件包。
dockerfile内容参照如下(具体可参考编写高效的Dockerfile ):
FROM registry-cbu.huawei.com/csopenjdk/openjdk RUN mkdir -p /opt/iot/edge/monitor / && chmod -R 777 /opt/ COPY monitor /opt/iot/edge/monitor USER root EXPOSE 8080 CMD ["java", "-jar", "/opt/iot/edge/monitor/monitor-app.jar", "run"] #构造镜像 #docker build -t edge_monitor:1.0.0 /home --no-cache #打标签 #docker tag edge_monitor:1.0.0 swr.cn-north-4.myhuaweicloud.com/iot_edge_test/ot_test:v1 #推送 #docker push swr.cn-north-4.myhuaweicloud.com/iot_edge_test/ot_test:v1 #打成镜像包 #docker save swr.cn-north-4.myhuaweicloud.com/iot_edge_test/ot_test:v1 > ot_test.tar
父主题: 集成ModuleSDK进行OT数采