Spaces:
Sleeping
Sleeping
| # Use an official Node runtime as a parent image | |
| FROM node:14 | |
| # Define environment variable | |
| ENV NAME=World | |
| # Set the working directory in the container | |
| WORKDIR /usr/src/app | |
| # Copy package.json and package-lock.json | |
| COPY package*.json /usr/src/app/ | |
| COPY server.js /usr/src/app/ | |
| # Install any needed packages | |
| RUN npm install && npm audit fix | |
| # Bundle app source inside the Docker image | |
| COPY . . | |
| # Make port available to the world outside this container | |
| EXPOSE 8080 | |
| # Run app when the container launches | |
| CMD ["node", "server.js"] | |