Download Dockerfile from working1/BOYU: direct link, hf CLI and curl.
- Browser
- Download file 1.17 kB
-
https://huggingface.co/spaces/working1/BOYU/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/working1/BOYU/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/working1/BOYU/resolve/main/Dockerfile
1.17 kB
| # Use Node.js LTS (Buster) as the base image | |
| FROM node:latest | |
| # Install FFmpeg, ImageMagick, and other essential tools | |
| RUN apt-get update && \ | |
| apt-get install -y \ | |
| ffmpeg \ | |
| imagemagick \ | |
| ghostscript \ | |
| libreoffice \ | |
| libwebp-dev \ | |
| tesseract-ocr \ | |
| sox \ | |
| && apt-get clean && rm -rf /var/lib/apt/lists/* | |
| # Clone the repository | |
| RUN git clone https://github.com/hakimi709/theboss /home/suhail | |
| # Set the working directory | |
| WORKDIR /home/suhail | |
| # Grant full permissions to the directory (this step should help if there are permission issues) | |
| RUN chmod -R 777 /home/suhail | |
| # Change ownership of the directory to the 'node' user | |
| RUN chown -R node:node /home/suhail | |
| USER node | |
| # Copy the server.js file into the working directory | |
| COPY server.js . | |
| COPY config.env /home/suhail | |
| USER root | |
| RUN chmod 777 /home/suhail/config.env | |
| USER node | |
| # Install dependencies (try npm first, fall back to yarn) | |
| RUN yarn install | |
| # Create the start.sh script directly | |
| RUN echo '#!/bin/sh\nnode server.js &\nnpm start' > start.sh | |
| # Make the start.sh script executable | |
| RUN chmod +x start.sh | |
| # Expose the port | |
| EXPOSE 80 | |
| # Run the start.sh script | |
| CMD ./start.sh | |