Skip to content

Instantly share code, notes, and snippets.

@fsndzomga
Created February 25, 2024 15:04
Show Gist options
  • Save fsndzomga/f680c55665a5387f0165a6d1f2743143 to your computer and use it in GitHub Desktop.
Save fsndzomga/f680c55665a5387f0165a6d1f2743143 to your computer and use it in GitHub Desktop.
# Step 1: Set the base image
FROM node:14
# Step 2: Set working directory
WORKDIR /usr/src/app
# Step 3: Copy package.json files
COPY package*.json ./
# Step 4: Install dependencies
RUN npm install
# Step 5: Copy application files
COPY . .
# Step 6: Expose application port
EXPOSE 3000
# Step 7: Define command to run the application
CMD ["node", "index.js"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment