Last active
February 13, 2019 22:53
-
-
Save bbachi/3de48b34dbecec4109771812974aa44d to your computer and use it in GitHub Desktop.
Containarize your Node.js Rest API - Javascript verison
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 | |
| # copying all the files from your file system to container file system | |
| COPY package.json . | |
| # install all dependencies | |
| RUN npm install | |
| # copy oter files as well | |
| COPY ./ . | |
| #expose the port | |
| EXPOSE 3070 | |
| # command to run when intantiate an image | |
| CMD ["npm","start"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment