AntiSupa / Dockerfile
NIKHTU03's picture
Update Dockerfile
b4acc84 verified
Raw
History Blame Contribute Delete
1.38 kB
FROM lbjlaq/antigravity-manager:latest
USER root
# 1. Install socat (port forwarding), xvfb (virtual display), and dbus-x11
RUN apt-get update && apt-get install -y socat xvfb dbus-x11 && rm -rf /var/lib/apt/lists/*
# 2. Set working directory
WORKDIR /app
# 3. Configure environment
ENV PORT=7860
EXPOSE 7860
ENV DISPLAY=:99
# 4. Create config directory with proper permissions
RUN mkdir -p /root/.antigravity_tools && chmod -R 777 /root/.antigravity_tools
# Copy entrypoint.sh (kept separate from startup script)
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
# 5. Create startup script
RUN echo '#!/bin/bash\n\
echo "Starting socat proxy 7860 -> 8045..."\n\
socat TCP-LISTEN:7860,fork,bind=0.0.0.0 TCP:127.0.0.1:8045 &\n\
\n\
echo "Starting Xvfb (Virtual Display)..."\n\
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &\n\
sleep 2\n\
\n\
echo "--- File Structure Overview ---"\n\
ls -R /app | head -n 50\n\
\n\
echo "--- Searching for main.js ---"\n\
find / -name "main.js" 2>/dev/null -exec echo "Found: {}" \; -exec cat {} \;\n\
\n\
echo "Starting Antigravity Tools..."\n\
# Try binary first, fallback to node if not found\n\
if [ -f "./antigravity-tools" ]; then\n\
exec ./antigravity-tools headless\n\
else\n\
exec node dist/main.js\n\
fi\n\
' > /start.sh && chmod +x /start.sh
# 6. Set entrypoint
ENTRYPOINT []
CMD ["/bin/bash", "/start.sh"]