AZILS commited on
Commit
a8902f5
·
verified ·
1 Parent(s): b425345

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -4
Dockerfile CHANGED
@@ -18,9 +18,6 @@ RUN mkdir -p /root/.antigravity_tools && chmod -R 777 /root/.antigravity_tools
18
 
19
  # 5. Write the startup script directly
20
  RUN echo '#!/bin/bash\n\
21
- echo "Starting socat proxy 7860 -> 8045..."\n\
22
- socat TCP-LISTEN:7860,fork,bind=0.0.0.0 TCP:127.0.0.1:8045 &\n\
23
- \n\
24
  echo "Starting Xvfb (Virtual Display)..."\n\
25
  Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &\n\
26
  sleep 2\n\
@@ -28,8 +25,16 @@ sleep 2\n\
28
  echo "Starting Antigravity Tools..."\n\
29
  # Adjust the path based on the actual image contents, usually ./antigravity-tools\n\
30
  if [ -f "./antigravity-tools" ]; then\n\
31
- exec ./antigravity-tools headless\n\
32
  fi\n\
 
 
 
 
 
 
 
 
33
  ' > /start.sh && chmod +x /start.sh
34
 
35
  # 6. Run the script
 
18
 
19
  # 5. Write the startup script directly
20
  RUN echo '#!/bin/bash\n\
 
 
 
21
  echo "Starting Xvfb (Virtual Display)..."\n\
22
  Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &\n\
23
  sleep 2\n\
 
25
  echo "Starting Antigravity Tools..."\n\
26
  # Adjust the path based on the actual image contents, usually ./antigravity-tools\n\
27
  if [ -f "./antigravity-tools" ]; then\n\
28
+ ./antigravity-tools headless &\n\
29
  fi\n\
30
+ \n\
31
+ echo "Waiting for Antigravity Tools to open port 8045..."\n\
32
+ while ! timeout 1 bash -c "echo > /dev/tcp/127.0.0.1/8045" 2>/dev/null; do\n\
33
+ sleep 1\n\
34
+ done\n\
35
+ \n\
36
+ echo "App is ready! Starting socat proxy 7860 -> 8045..."\n\
37
+ exec socat TCP-LISTEN:7860,fork,bind=0.0.0.0 TCP:127.0.0.1:8045\n\
38
  ' > /start.sh && chmod +x /start.sh
39
 
40
  # 6. Run the script