Activity: Lets build a nodejs application
- Lets try to run a simple nodejs application with angularjs frontend
- The code of the application is Refer Here
- To run this application we need
- node js
- npm
- Node js image Refer Here
- Manual steps:
git clone https://github.com/gothinkster/angular-realworld-example-app.git
cd angular-realworld-example-app
npm install -g @angular/cli
npm install
# To start the application http://localhost:4200
ng serve
- LABEL instruction is used to add metadata Refer Here
- WORKDIR instruction Refer Here
- Refer Here for the docker file
- Generally docker files are present closer to code. If we want code to be copied in the image we can use
ADD . <dest> - For copying the localfiles into image we can use two instructions
- ADD
- copy from local as well as remote (web or http urls or git)
- COPY
- copy only from local machine.
- ADD
