| # Use an official Node.js runtime as a parent image | |
| FROM node:18-alpine | |
| # Set the working directory to /app | |
| WORKDIR /app | |
| RUN npm init -y && npm i requests | |
| # Copy package.json and package-lock.json (if available) | |
| COPY package*.json ./ | |
| # Install app dependencies | |
| RUN npm install --only=production | |
| # Bundle app source | |
| COPY . . | |
| # Expose the port the app runs on | |
| EXPOSE 7860 | |
| # Define the command to run your app | |
| CMD [ "node", "app.js" ] |