AG / Dockerfile
Bottomg32311's picture
Update Dockerfile
c6b289c verified
Raw
History Blame Contribute Delete
641 Bytes
FROM node:18
# 1. Install 'socat' to bridge the private local network to Hugging Face's public network
RUN apt-get update && apt-get install -y socat
# 2. Fake the browser-open command so it doesn't crash
RUN echo '#!/bin/sh\nexit 0' > /usr/local/bin/xdg-open && chmod +x /usr/local/bin/xdg-open
# 3. Clone the repo and install dependencies
RUN git clone https://github.com/hydall/JAR.git /app
WORKDIR /app
RUN npm install
# 4. Expose the standard Hugging Face port
EXPOSE 7860
# 5. Start the app in the background, and route traffic from 7860 -> localhost:4577
CMD npm start & socat TCP-LISTEN:7860,fork,bind=0.0.0.0 TCP:127.0.0.1:4577