DevOps Classroomnotes 21/Nov/2022

Container Revision

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
Published
Categorized as Uncategorized Tagged

By continuous learner

devops & cloud enthusiastic learner

Leave a comment

Turn on JavaScript to leave a comment.

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

Please turn AdBlock off
Customized Social Media Icons from Acurax Digital Marketing Agency
Exit mobile version
%%footer%%