DevOps Classroomnotes 21/Nov/2022

Container Revision

Preview

Practical Revision => Containerizing

  • Lets try to containerize Refer Here
  • Manual commands
git clone https://github.com/simonplend/example-app-nodejs-backend-react-frontend.git
cd example-app-nodejs-backend-react-frontend/
npm install 
npm run build 
npm start --host "0.0.0.0"
  • Dockerfile
FROM node:14
LABEL author=khaja
EXPOSE 3000
RUN git clone https://github.com/simonplend/example-app-nodejs-backend-react-frontend.git && \
    cd example-app-nodejs-backend-react-frontend && \
    npm install && \
    npm run build
WORKDIR /example-app-nodejs-backend-react-frontend
CMD ["npm", "start", "--host", "0.0.0.0"]
  • Build the image and run the container
    Preview

Published
Categorized as Uncategorized Tagged

By continuous learner

devops & cloud enthusiastic learner

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please turn AdBlock off
Animated Social Media Icons by Acurax Responsive Web Designing Company

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Visit Us On FacebookVisit Us On LinkedinVisit Us On Youtube