Skip to content

Instantly share code, notes, and snippets.

@ProgrammingFire
Created February 3, 2022 07:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ProgrammingFire/c8beb43d579d202b9586b29e0edf3430 to your computer and use it in GitHub Desktop.
Save ProgrammingFire/c8beb43d579d202b9586b29e0edf3430 to your computer and use it in GitHub Desktop.
Sample Node.JS Docker file
FROM node:latest # Replace With Your Node.JS Version
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production # Similiar To npm install
COPY . ./
ENV PORT 8000
EXPOSE ${PORT}
RUN npm run build
CMD ["npm", "run", "start"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment