Giter Club home page Giter Club logo

nerd-dinner's Introduction

Nerd Dinner

This is NerdDinner, an old ASP.NET MVC app - cloned from CodePlex.

It's being Dockerized to demonstrate how "legacy" ASP.NET apps can easily be packaged as Docker images and run in Windows Containers - which is the first step in modernizing them.

Roadmap

  • Part 1 - run the existing app in Docker with no code changes. Done in branch dockerize-part1;
  • Part 2 - running the database in a separate container, and using the same Docker image for different environments. Done in branch dockerize-part2;
  • Part 3 - splitting out the homepage component as a synchronous microservice running in it's own Docker container;
  • Part 4 - splitting out the create dinner component as an asynchronous microservice, running message queue and message handler containers;
  • Part 5 - scaling and failover with a hybrid Docker Swarm.

Follow @EltonStoneman on Twitter for updates.

nerd-dinner's People

Contributors

sixeyed avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nerd-dinner's Issues

image operating system "windows" cannot be used on this platform.

I am trying to run this by typing
docker run -d -p 80:8081 sixeyed/nerd-dinner:part1

but I receive the following error:
C:\Program Files\Docker\Docker\Resources\bin\docker.exe: image operating system "windows" cannot be used on this platform.

I am running windows 10 Enterprise with Docker for windows Version 17.09.0-ce-win33 (13620)

Why not using DSC for building images?

Advantages of using DSC over docker file

  1. Clean powershell scripts (no crazy escaping etc required in docker file
  2. Single layer is created (every RUN inside docker creates new layer)
  3. Easily testable in full Windows Core
  4. Easily step by step debuggable (not available in DockerFile)
  5. Can be reused outside of containers
  6. DSC client is built into base containers
    There are probably others but just above shall be good reason to stick to DSC instead of DockerFile. I'm yet to think a single reason what direct Dockerfile entries have over DSC approach.

unexpected status resolving reader: 404 Not Found error for docker build at PS

Hii All,
I am using windows server2016-64 bit with docker(Azure VM) as below

PS C:\nerd-dinner> docker version
Client:
 Version:           18.03.1-ee-3
 API version:       1.37
 Go version:        go1.10.2
 Git commit:        b9a5c95
 Built:             Thu Aug 30 18:42:35 2018
 OS/Arch:           windows/amd64
 Experimental:      false

Server:
 Engine:
  Version:          18.03.1-ee-3
  API version:      1.37 (minimum version 1.
  Go version:       go1.10.2
  Git commit:       b9a5c95
  Built:            Thu Aug 30 18:56:49 2018
  OS/Arch:          windows/amd64
  Experimental:     false

I downloaded code and was following below dockrezation(dinner-part-1)
https://blog.sixeyed.com/dockerizing-nerd-dinner-part-1-running-a-legacy-asp-net-app-in-a-windows-container/

I placed that docker file and published app at same "C:\nerd-dinner" path and tried to build command at PS as below

PS C:\nerd-dinner> docker build -t sixeyed/nerd-dinner:part1 .
Sending build context to Docker daemon  10.87MB
Step 1/12 : FROM microsoft/iis:10.0.14393.206
10.0.14393.206: Pulling from microsoft/iis
9c7f9c7d9bc2: Retrying in 1 second
081af1807c20: Download complete
552bd0bc6fa3: Download complete
0964ce0f4e6c: Download complete
unexpected status resolving reader: 404 Not Found

As above Error unexpected status resolving reader: 404 Not Found is coming and cannot see any images created by "docker images -a" command.

Please Help.
Thanks,

getting operating system error 5

Hi,
I tried to dockerize the nerd-diner based on your blog
https://blog.sixeyed.com/dockerizing-nerd-dinner-part-1-running-a-legacy-asp-net-app-in-a-windows-container/

My docker file is as below

#Depending on the operating system of the host machines(s) that will build or run the containers, the image specified in the FROM statement may need to be changed.
#For more information, please see https://aka.ms/containercompat 

FROM mcr.microsoft.com/dotnet/framework/aspnet:4.8-windowsservercore-ltsc2019
# Install SQL Server LocalDB
RUN Invoke-WebRequest -OutFile c:\SqlLocalDB.msi -Uri http://download.microsoft.com/download/8/D/D/8DD7BDBA-CEF7-4D8E-8C16-D9F69527F909/ENU/x64/SqlLocalDB.MSI  
RUN ["cmd", "/S", "/C", "c:\\windows\\syswow64\\msiexec", "/i", "c:\\SqlLocalDB.msi", "IACCEPTSQLLOCALDBLICENSETERMS=YES", "/qn"]  
RUN & 'C:\\Program Files\\Microsoft SQL Server\\110\Tools\\Binn\\sqllocaldb' start "v11.0"

# Setup app pool for LocalDB access
RUN Import-Module WebAdministration;  \
    Set-ItemProperty 'IIS:\\AppPools\\DefaultAppPool' -Name 'processModel.loadUserProfile' -Value 'True'; \
    Set-ItemProperty 'IIS:\\AppPools\\DefaultAppPool' -Name 'processModel.setProfileEnvironment' -Value 'True'
    
EXPOSE 80
WORKDIR /inetpub/wwwroot
COPY . .

On trying to access the db I'm getting the below exception

CREATE FILE encountered operating system error 5(Access is denied.) while attempting to open or create the physical file 'c:\inetpub\wwwroot\App_Data\aspnet-NerdDinner-20120906143403.mdf'.
CREATE DATABASE failed. Some file names listed could not be created. Check related errors.
My web.config file has the following settings

<add name="DefaultConnection" connectionString="Data Source=(LocalDb)\v11.0;Initial Catalog=aspnet-NerdDinner-20120906143403;Integrated Security=SSPI;AttachDBFilename=c:\inetpub\wwwroot\App_Data\aspnet-NerdDinner-20120906143403.mdf" providerName="System.Data.SqlClient" />
    <add name="NerdDinnerContext" connectionString="Data Source=(localdb)\v11.0; Initial Catalog=NerdDinnerContext-20120906143708; Integrated Security=True; MultipleActiveResultSets=True; AttachDbFilename=c:\inetpub\wwwroot\NerdDinnerContext-20120906143708.mdf" providerName="System.Data.SqlClient" />

Use volumes for log forwarding

Would sharing the log files using shared volumes & then using a log forwarder, maybe in another container or on the host machine be simpler than hacking IIS & the base images from microsoft ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.