FROM ghcr.io/heyputer/puter:latest # Puter image uses /opt/puter/app as the base WORKDIR /opt/puter/app # Force the port and domain via Environment Variables # HF_SPACE_ID looks like "username/spacename", we convert it to the URL format ENV PUTER_PORT=7860 ENV PUTER_DOMAIN=localhost ENV PUTER_FORCE_DOMAIN=true ENV PUTER_NO_SUBDOMAIN=true # Tell Hugging Face to use 7860 EXPOSE 7860 # Run Puter directly with the correct flags # --host 0.0.0.0 is critical for the proxy to see the app CMD ["node", "index.js", "--port", "7860", "--host", "0.0.0.0"]