Adding better waiting logic, waiting for process to be done - not lock to be released

This commit is contained in:
2026-04-11 16:30:08 +02:00
parent 33237fef5b
commit a91bc920be
+6 -1
View File
@@ -275,7 +275,12 @@ info "Starting containers..."
docker compose up -d
info "Installing gutasktool inside agent0 container..."
docker exec agent0 bash -c "while [ -f /var/lib/apt/lists/lock ] || [ -f /var/lib/dpkg/lock-frontend ]; do sleep 2; done && apt-get update -q && apt-get install -y -q python3-pip && python3 -m pip install --break-system-packages -q -e /a0/usr/gutasktool"
info "Waiting for agent0 container to finish initializing..."
until docker exec agent0 bash -c "! pgrep -x apt-get > /dev/null && ! pgrep -x dpkg > /dev/null" 2>/dev/null; do
sleep 3
done
info "Container ready, installing gutasktool..."
docker exec agent0 bash -c "apt-get update -q && apt-get install -y -q python3-pip && python3 -m pip install --break-system-packages -q -e /a0/usr/gutasktool"
echo ""
docker compose ps