Spaces:
Paused
Paused
| FROM lbjlaq/antigravity-tools-ls:latest | |
| USER root | |
| # 1. Install utilities for port forwarding and virtual display | |
| RUN apt-get update && apt-get install -y socat xvfb && rm -rf /var/lib/apt/lists/* | |
| # 2. Set environment variables | |
| # We set the APP port to 5188 internally | |
| ENV PORT=5188 | |
| EXPOSE 7860 | |
| ENV DISPLAY=:99 | |
| ENV ABV_DIST_PATH=/app/dist | |
| # 3. Create necessary directories and ensure permissions | |
| # bin is where ls_core and cert.pem will be downloaded | |
| RUN mkdir -p /root/.antigravity_tools_ls/bin && \ | |
| mkdir -p /root/.antigravity_tools_ls/data && \ | |
| chmod -R 777 /root/.antigravity_tools_ls | |
| # 4. Startup script (Public 7860 -> Internal 5188) | |
| RUN echo '#!/bin/bash\n\ | |
| echo "Starting socat proxy: 7860 -> 5188..."\n\ | |
| # Wait a second to ensure the app has started or socat can bind\n\ | |
| socat TCP-LISTEN:7860,fork,bind=0.0.0.0 TCP:127.0.0.1:5188 &\n\ | |
| \n\ | |
| echo "Starting Xvfb (Virtual Display)..."\n\ | |
| Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &\n\ | |
| sleep 2\n\ | |
| \n\ | |
| echo "Starting Antigravity Tools LS..."\n\ | |
| # We run the server from the app directory\n\ | |
| exec /app/antigravity-server\n\ | |
| ' > /start.sh && chmod +x /start.sh | |
| # 5. Run the script | |
| ENTRYPOINT [] | |
| CMD ["/bin/bash", "/start.sh"] | |