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

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