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"
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

Like this:
Like Loading...