DevOps Classroomnotes 13/Apr/2023

Dockerfile contd..

.net application manual process

  • Refer Here for manual steps
  • This application requires
    • mysql server (lets ignore this)
    • .dotnet runtime 7.0
    • it runs on port 5000
  • Steps:
    • Ensure dotnet 7 is installed
    • Download application from Refer Here
    • unzip the application into some folder
    • create two directories bin and logs
    • Run the application using command dotnet --urls "http://0.0.0.0:5000" Nop.Web.dll
  • We have created the following Dockerfile
FROM mcr.microsoft.com/dotnet/sdk:7.0
LABEL author="khaja" organization="qt" project="learning"
ADD https://github.com/nopSolutions/nopCommerce/releases/download/release-4.60.2/nopCommerce_4.60.2_NoSource_linux_x64.zip /nop/nopCommerce_4.60.2_NoSource_linux_x64.zip
WORKDIR /nop
RUN apt update && apt install unzip -y && \
    unzip /nop/nopCommerce_4.60.2_NoSource_linux_x64.zip && \
    mkdir /nop/bin && mkdir /nop/logs
EXPOSE 5000
CMD [ "dotnet", "--urls", "http://0.0.0.0:5000", "Nop.Web.dll" ]

  • This is not working
  • Try fixing
  • Try using alpine version of dotnet 7 for the same application

Dockerfile instructions

  • WORKDIR: This instruction sets the working directory Refer Here
Published
Categorized as Uncategorized Tagged

By continuous learner

devops & cloud enthusiastic learner

Leave a ReplyCancel reply

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

Discover more from Direct DevOps from Quality Thought

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

Continue reading

Exit mobile version
%%footer%%