Skip to content

Commit 194b582

Browse files
committed
wait for the container ready
1 parent 4e13df7 commit 194b582

1 file changed

Lines changed: 20 additions & 1 deletion

File tree

starrocks/install.sh

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,23 @@ sudo snap install docker
44
sudo apt-get update
55
sudo apt-get install -y mysql-client
66

7-
docker run -p 9030:9030 -p 8030:8030 -p 8040:8040 -itd --name starrocks starrocks/allin1-ubuntu
7+
# Start the Docker container
8+
echo "Starting StarRocks container..."
9+
docker run -p 9030:9030 -p 8030:8030 -p 8040:8040 -itd --name starrocks starrocks/allin1-ubuntu:4.0.0-rc01
10+
11+
# Wait for container to start
12+
sleep 5
13+
14+
# Monitor logs until "Enjoy" appears
15+
echo "Monitoring container logs for 'Enjoy' message..."
16+
timeout 300 docker logs -f starrocks | while read line; do
17+
echo "$line"
18+
if echo "$line" | grep -q "Enjoy"; then
19+
echo "Found 'Enjoy' message! Container is ready."
20+
# Kill the docker logs process
21+
pkill -f "docker logs -f starrocks"
22+
break
23+
fi
24+
done
25+
26+
echo "StarRocks started successfully."

0 commit comments

Comments
 (0)