Download Dockerfile from Riddwam/cats: direct link, hf CLI and curl.
- Browser
- Download file 750 Bytes
-
https://huggingface.co/spaces/Riddwam/cats/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Riddwam/cats/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Riddwam/cats/resolve/main/Dockerfile
750 Bytes
| # Use a base image with Node.js installed | |
| FROM node:20-slim | |
| # Set the working directory inside the container | |
| WORKDIR /app | |
| # Copy package.json and package-lock.json (if you have one) first | |
| # to leverage Docker cache. This installs dependencies before copying | |
| # the rest of the source code. | |
| COPY package*.json ./ | |
| # Install dependencies | |
| RUN npm install | |
| # Copy the rest of the application source code | |
| COPY . . | |
| # Run the build command | |
| RUN npm run build | |
| # Install a simple static file server globally | |
| RUN npm install -g serve | |
| # Expose the port the server will run on (Hugging Face defaults to 7860 for Docker) | |
| EXPOSE 7860 | |
| # Command to run the static file server, serving the build output (dist directory) | |
| CMD [ "serve", "-s", "dist", "-l", "7860" ] |