阿里云边缘计算网关配置问题
系统:Windows10
Docker:Docker Desktop (version 19.03.8)
Link IoT Edge:LE Pro专业版
现象:安装脚本或者运行时出现如下错误
C:\Program Files\Docker\Docker\resources\bin\docker.exe: Error response from daemon: OCI runtime create failed: container_linux.go:349: starting container process caused "exec: \"D:/Program Files/Git/linkedge/gateway/build/script/set_gw_triple.sh\": stat D:/Program Files/Git/linkedge/gateway/build/script/set_gw_triple.sh: no such file or directory": unknown.
原因:因该是Windows环境下路径格式导致,官方脚本未考虑。
解决方案:
link-iot-edge.sh 第437行:${preflag} docker run ... --entrypoint /linkedge/gateway/build/script/set_gw_triple.sh ...这一段的“/”需要改成“//”。
if [[ $# -eq 4 ]] ; then ${preflag} docker run --rm --privileged=true -v //var/run/docker.sock:/var/run/docker.sock -v linkedge_vol1:/usr/.security -v linkedge_vol2:/etc/.sec/ -v linkedge_vol3:/linkedge/gateway/build/.sst -v linkedge_vol4:/tmp/var/run/ -v linkedge_vol5:/linkedge/run --name=config-params --entrypoint //linkedge//gateway//build//script//set_gw_triple.sh $LINKEDGE_IMG $2 $3 $4