Created
June 28, 2022 07:22
-
-
Save mcnaveen/3d22586293ea2e34388f2c9a9c7255e6 to your computer and use it in GitHub Desktop.
Dockerfile for Simple Express API
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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