Spaces:
Paused
Paused
| # Use the official Node.js image as the base image | |
| FROM node:20.4 | |
| # Set the working directory in the container | |
| WORKDIR /app | |
| # Git clone clewd | |
| RUN git clone -b think https://github.com/jianglinzhang/clewd.git . | |
| RUN sed -i -E '/res\.write\(`<!DOCTYPE html>.*<\/html>`\);/d' /app/clewd.js | |
| # Install the dependencies | |
| RUN npm install --no-audit --fund false | |
| # Change ownership of files in lib/bin and set permissions | |
| RUN chown -R node:node lib/bin/* && \ | |
| chmod u+x lib/bin/* && \ | |
| chmod -R 777 /app | |
| # Run as the "node" user for better security practices | |
| USER node | |
| RUN ls -la | |
| ENV PORT=7860 | |
| EXPOSE 7860 | |
| # Start the application | |
| CMD ["node", "clewd.js"] |