Skip to content

Instantly share code, notes, and snippets.

@mcnaveen
Created June 28, 2022 07:22
Show Gist options
  • Save mcnaveen/3d22586293ea2e34388f2c9a9c7255e6 to your computer and use it in GitHub Desktop.
Save mcnaveen/3d22586293ea2e34388f2c9a9c7255e6 to your computer and use it in GitHub Desktop.
Dockerfile for Simple Express API
FROM node:16
# Create app directory
WORKDIR /usr/src/app
# Copy package.json
COPY package*.json ./
# Install dependencies
RUN yarn install
# Copy all files
COPY . .
# Expose port 3000
EXPOSE 3000
# Run app
CMD [ "node", "index.js" ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment