aspnet / MusicStore

[Archived] MusicStore test application that uses ASP.NET/EF Core. Project moved to https://github.com/aspnet/AspNetCore
1.3k stars 878 forks source link

Add details on running in Docker Windows containers #713

Closed friism closed 7 years ago

friism commented 8 years ago

This is based on work by @PatrickLang done here: https://github.com/PatrickLang/MusicStore/tree/plang-temp-compose

rs38 commented 7 years ago

could it be modified to work with FROM microsoft/dotnet:1.0.0-preview2-nanoserver-sdk ?

friism commented 7 years ago

@rs38 Yeah, that works great too. You have to run the windowsservercore-based sql server image though, so it doesn't matter greatly.

rs38 commented 7 years ago

isn't therey any SQL based on nanoserver+.NET core image? Still looking for a nice, non-trivial POC for nano+container, which does not get bigger than roughly 1 GB

friism commented 7 years ago

isn't therey any SQL based on nanoserver

@rs38 Microsoft SQL Server does not run on Nano Server, as far as I know.

rs38 commented 7 years ago

that's why I mentioned "any". Any in-process SQL would do, as well as not being bound to IIS but may be Kestrel. I need to admit I am not quite sure which prerequisites EF has related to SQL

friism commented 7 years ago

@rs38 if you interested in a pure nanoserver-based sample, can you open a separate PR doing that? There's a list of EF supported databases here: https://docs.efproject.net/en/latest/providers/index.html

rs38 commented 7 years ago

I am afraid, I do not have a solution to provide

PatrickLang commented 7 years ago

@rs38 MusicStore does have an in-memory database. Look at startup.cs for _platform.UseInMemoryStore . You can hack up the code to enable it. I did that before I had the SQL connection working in containers.

PatrickLang commented 7 years ago

Thanks for doing this, I've been intending to move my version back to Kestrel and rebase it and issue a PR but this looks cleaner

friism commented 7 years ago

@PatrickLang totally! And this was based on your prepatory work for Ignite btw, adding acknowledgement in the description

friism commented 7 years ago

@pranavkm @Praburaj I already signed the CLA last year, do I need to sign it again?

pranavkm commented 7 years ago

@troydai do you think this would be a useful scenario for our functionals?

If not, perhaps these instructions might be better suited for the https://github.com/aspnet/Home repo. @danroth27 for thoughts on this.

dnfclas commented 7 years ago

@friism, Thanks for signing the contribution license agreement so quickly! Actual humans will now validate the agreement and then evaluate the PR.
Thanks, DNFBOT;

friism commented 7 years ago

Do you have a chance to tryout the Music Store on Windows Nano Server?

@troydai as I mentioned above, Windows Server core base layer is needed anyway for the SQL Server service. The web part runs fine on nano, and I can change it, but it means that for a user starting on a naked machine, they have to pull both nanoserver and windowsservercore base layers

rs38 commented 7 years ago

Nano image is less than a 10th of servercore. Who would hesitate? ☺

friism commented 7 years ago

@rs38 one would hesitate because in this specific case, switching to Nanoserver causes Docker to download more stuff on an empty system (because windowsservercore is required no matter what for SQL Server)

friism commented 7 years ago

@troydai ptal

troydai commented 7 years ago

/cc @muratg @glennc

friism commented 7 years ago

Alright, @taylorb-microsoft convinced me to change to nanoserver because it starts and builds faster. Also pulled in some compose improvements from Patrick. For now, this requires master builds of compose: https://dl.bintray.com/docker-compose/master/

rs38 commented 7 years ago

this cannot (completely) run on nanoserver (without hyper-v like as e.g. on Azure) as long as there is a dependency to a windowsservercore based SQL db.

PatrickLang commented 7 years ago

Are there any objections to merging this if the AppVeyor build is fixed?

friism commented 7 years ago

It looks like the Appveyor build has been broken for approximately 5 months...

glennc commented 7 years ago

@muratg Are the guys responsible for build breaks not looking at these?