Skip to content

Instantly share code, notes, and snippets.

@balasista
Created March 8, 2023 04:10
Show Gist options
  • Save balasista/2a35fc06631a249454b4efe08fb09f7d to your computer and use it in GitHub Desktop.
Save balasista/2a35fc06631a249454b4efe08fb09f7d to your computer and use it in GitHub Desktop.

Revisions

  1. balasista created this gist Mar 8, 2023.
    20 changes: 20 additions & 0 deletions dockerfile
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,20 @@
    # Use an official Node.js runtime as a parent image
    FROM node:14-alpine

    # Set the working directory to /app
    WORKDIR /app

    # Copy the package.json and package-lock.json files to the working directory
    COPY package*.json ./

    # Install the dependencies
    RUN npm install

    # Copy the rest of the application code to the working directory
    COPY . .

    # Expose port 8080
    EXPOSE 9876

    # Start the application
    CMD ["npm", "start"]