fix install.zsh
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -9,4 +9,4 @@ k8s/deploy.yml
|
|||||||
web/dist
|
web/dist
|
||||||
node_modules
|
node_modules
|
||||||
package-lock.json
|
package-lock.json
|
||||||
|
/tmp
|
||||||
|
|||||||
13
install.zsh
13
install.zsh
@@ -394,10 +394,21 @@ function at-repos-docker-verify() {
|
|||||||
plc) check_file="/app/packages/server/dist/index.js" ;;
|
plc) check_file="/app/packages/server/dist/index.js" ;;
|
||||||
*) return 0 ;;
|
*) return 0 ;;
|
||||||
esac
|
esac
|
||||||
if docker run --rm "$image" test -f "$check_file" 2>/dev/null; then
|
local cid
|
||||||
|
cid=$(docker create --entrypoint "" "$image" true 2>&1)
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo " ❌ FAILED: cannot create container from $image"
|
||||||
|
echo " $cid"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
if docker cp "$cid:$check_file" /tmp/.docker-verify-tmp 2>/dev/null; then
|
||||||
|
rm -f /tmp/.docker-verify-tmp
|
||||||
|
docker rm "$cid" > /dev/null 2>&1
|
||||||
echo " ✅ Verified: $check_file exists"
|
echo " ✅ Verified: $check_file exists"
|
||||||
return 0
|
return 0
|
||||||
else
|
else
|
||||||
|
rm -f /tmp/.docker-verify-tmp
|
||||||
|
docker rm "$cid" > /dev/null 2>&1
|
||||||
echo " ❌ FAILED: $check_file not found in $image"
|
echo " ❌ FAILED: $check_file not found in $image"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user