Advertisement
Guest User

Untitled

a guest
Apr 18th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. # 1. Grab the latest node image
  2. FROM node:latest
  3. # 2. Set the working directory inside the container to /app
  4. WORKDIR /app
  5. # 3. Add the .env to the directory (We need those variables)
  6. ADD .env /app
  7. # 4. Expose port defined in .env file
  8. EXPOSE ${PORT}
  9. # 5. Add package.json to the directory
  10. ADD package.json /app
  11. # 6. Install dependencies
  12. RUN npm install
  13. # 7. Copy the rest into directory
  14. COPY . /app
  15. # 8. Start the app inside the container
  16. CMD ["npm", "start"]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement