2022-07-18 23:12:57 +08:00
|
|
|
#!/bin/bash
|
|
|
|
echo start
|
2023-04-12 23:40:00 +08:00
|
|
|
tag="2.0.0"
|
2022-07-25 12:06:49 +08:00
|
|
|
echo $tag
|
2022-07-18 23:12:57 +08:00
|
|
|
docker build -t iotgateway .
|
2022-07-25 12:06:49 +08:00
|
|
|
|
2022-07-18 23:12:57 +08:00
|
|
|
docker stop iotgateway
|
|
|
|
docker rm iotgateway
|
2022-07-25 12:06:49 +08:00
|
|
|
|
2022-07-18 23:12:57 +08:00
|
|
|
docker run -d --restart always --name iotgateway -p 518:518 -p 1888:1888 -p 62541:62541 -p 503:503 iotgateway
|
2022-07-25 12:06:49 +08:00
|
|
|
|
2022-07-18 23:12:57 +08:00
|
|
|
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/
|
2022-07-25 12:06:49 +08:00
|
|
|
|
2022-07-18 23:12:57 +08:00
|
|
|
docker restart iotgateway
|
2022-07-25 12:06:49 +08:00
|
|
|
|
2022-07-27 20:23:31 +08:00
|
|
|
docker commit iotgateway registry.cn-hangzhou.aliyuncs.com/iotgateway/iotgateway:$tag
|
|
|
|
docker push registry.cn-hangzhou.aliyuncs.com/iotgateway/iotgateway:$tag
|
2022-07-25 12:06:49 +08:00
|
|
|
|
2022-07-27 20:23:31 +08:00
|
|
|
docker tag registry.cn-hangzhou.aliyuncs.com/iotgateway/iotgateway:$tag registry.cn-hangzhou.aliyuncs.com/iotgateway/iotgateway:latest
|
|
|
|
docker push registry.cn-hangzhou.aliyuncs.com/iotgateway/iotgateway:latest
|
2022-07-25 12:06:49 +08:00
|
|
|
|
2022-07-27 20:23:31 +08:00
|
|
|
docker tag registry.cn-hangzhou.aliyuncs.com/iotgateway/iotgateway:latest 15261671110/iotgateway:$tag
|
2022-07-25 12:06:49 +08:00
|
|
|
docker push 15261671110/iotgateway:$tag
|
|
|
|
|
|
|
|
docker tag 15261671110/iotgateway:$tag 15261671110/iotgateway:latest
|
|
|
|
docker push 15261671110/iotgateway:latest
|