Created
February 14, 2019 07:15
-
-
Save bbachi/2078e0bb2c1540e241499730d36a2d4f to your computer and use it in GitHub Desktop.
Containerize your Node.js Rest API and run it on Docker v2
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 base image node | |
| FROM node:8.11-slim | |
| RUN mkdir -p /usr/src/app | |
| WORKDIR /usr/src/app | |
| # copy oter files as well | |
| COPY dist/api.bundle.js . | |
| #expose the port | |
| EXPOSE 3070 | |
| # command to run when intantiate an image | |
| CMD ["node","api.bundle.js"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment