DevOps Classroomnotes 13/Nov/2022

Solutions to Exercises

Exercise 1

  • Exercise: Create a docker image for simple flask application
  • Steps:
git clone https://github.com/Sysnove/flask-hello-world.git
cd flask-hello-world
mv hello.py app.py
pip3 install flask
flask run -h "0.0.0.0"
  • Refer Here for the dockerfile
  • In alpine image git was not installed so moving to bullseye Refer Here
  • Build the image and run the container
    Preview
  • Now lets inspect the sizes of images
  • To fix the size issue, we have moved to bulls eye only for git
    • One solution is to use the multistage build and copy the directory
    • Second solution is clone the git while building the image
      Preview
  • Second solution can be found at Refer Here

Exercise -2

  • Refer Here for the manual steps to install nop commerce
  • Solution:
    • Take an asp.net core runtime
    • Add unzip installation
    • unzip the nopcommerce
    • run the application by dotnet Nop.Web.dll
    • Take mcr.microsoft.com/dotnet/aspnet:6.0 as base image.
  • Start building the image.
  • Refer Here for the docker file

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