docker镜像编译脚本

This commit is contained in:
iioter 2022-07-18 23:12:57 +08:00
parent 8e33a90f97
commit 47e3603d36
2 changed files with 30 additions and 0 deletions

15
auto-build-arm.sh Normal file
View File

@ -0,0 +1,15 @@
#!/bin/bash
echo start
docker build -t iotgateway .
docker stop iotgateway
docker rm iotgateway
docker run -d --restart always --name iotgateway -p 518:518 -p 1888:1888 -p 62541:62541 -p 503:503 iotgateway
docker cp 3d iotgateway:app/wwwroot/
docker cp drivers iotgateway:app/
docker cp IoTGateway/iotgateway.db iotgateway:app/
docker cp IoTGateway/Quickstarts.ReferenceServer.Config.xml iotgateway:app/
docker restart iotgateway
docker commit iotgateway registry.cn-hangzhou.aliyuncs.com/wanghaidong/iotgateway:arm
docker push registry.cn-hangzhou.aliyuncs.com/wanghaidong/iotgateway:arm
docker tag registry.cn-hangzhou.aliyuncs.com/wanghaidong/iotgateway:arm 15261671110/iotgateway:arm
docker push 15261671110/iotgateway:arm

15
auto-build.sh Normal file
View File

@ -0,0 +1,15 @@
#!/bin/bash
echo start
docker build -t iotgateway .
docker stop iotgateway
docker rm iotgateway
docker run -d --restart always --name iotgateway -p 518:518 -p 1888:1888 -p 62541:62541 -p 503:503 iotgateway
docker cp 3d iotgateway:app/wwwroot/
docker cp drivers iotgateway:app/
docker cp IoTGateway/iotgateway.db iotgateway:app/
docker cp IoTGateway/Quickstarts.ReferenceServer.Config.xml iotgateway:app/
docker restart iotgateway
docker commit iotgateway registry.cn-hangzhou.aliyuncs.com/wanghaidong/iotgateway
docker push registry.cn-hangzhou.aliyuncs.com/wanghaidong/iotgateway
docker tag registry.cn-hangzhou.aliyuncs.com/wanghaidong/iotgateway 15261671110/iotgateway
docker push 15261671110/iotgateway