Skip to content
This repository has been archived by the owner. It is now read-only.

Added onbuild Dockerfile #7

Closed
wants to merge 0 commits into from
Closed

Added onbuild Dockerfile #7

wants to merge 0 commits into from

Conversation

@vlesierse
Copy link
Contributor

@vlesierse vlesierse commented Nov 14, 2014

First of all, great to see that Microsoft helps to run ASP.NET 5 application on Docker. This opens up a ton of possibilities. The last days I was creating images on my own to test out ASP.NET vNext on CoreOS, but this make things a bit easier.

Personally when I deploy an application using a Docker container I like doing this using a onbuild version of the Docker image. An example of using this onbuild image could be found here. This is not something new and you see that for instance Node is also doing this.

Next thing this pull request addresses is the fact the Kestrel isn't running on Linux at the moment. There is already a issue reported, but it could help people getting the images and there code working correctly.

This pull request isn't really to contribute the code directly but start the discussion and ask for feedback.

PS. I love the direction Microsoft is moving to.

@ahmetb
Copy link
Contributor

@ahmetb ahmetb commented Nov 15, 2014

@vlesierse great work!

I'm not sure if we should provide onbuild images right now. ASP.NET 5 is still in preview and has many moving everyday. Since building an ONBUILD image restricts flexibility in certain areas, it requires deep understanding of everybody's use cases as any change in onbuild images may break every single user. This is something we might choose to avoid until aspnet-5 goes out of preview.

However, libuv parts are certainly needed. I suggest sending Kestrel fixes separately from ONBUILD images. We can merge those much easier.

@muojp
Copy link
Contributor

@muojp muojp commented Nov 15, 2014

@vlesierse great and fast. Yes, Kestrel support is important regardless of its stability at this time (because it's in very early preview stage). I'm eager to work on aspnet/KestrelHttpServer#34 for resolving certain dead-lock issue inside the framework (not yet tracked it's a Kestrel issue or Mono issue or even a libuv issue).

It seems your "Install libuv for Kestrel" part is copied from my recent work ( https://github.com/muojp/docker-asp.net/blob/18e779223f96dd79afcf563319003d1320c09a31/Dockerfile#L13-L19 ). It's a good mash-up I think. I already put the polished (avoided codeload.* hardcode for considering host name change) version of libuv build and sent PR #8.

@vlesierse
Copy link
Contributor Author

@vlesierse vlesierse commented Nov 15, 2014

@muojp That is correct. Compiling libuv when building the image was a great move although it didn't cover the whole fix for me somehow. I see that the ldconfig should solve this, but somehow it didn't with my onbuild scenario. That is why I copied the build output to the package created by the kpm restore.
find ~/.kpm/packages -name libuv.dylib | xargs -n 1 cp /usr/local/lib/libuv.so.1

@ahmetalpbalkan I agree. Also the k command needs to be executed in the folder containing the project.json which requires the WORKDIR to be set. It doesn't seems like a elegant solution. Perhaps some adjustment to the global.json to specify a startup project from the solution folder?

@vlesierse vlesierse changed the title Added onbuild Dockerfile and Kestrel fix Added onbuild Dockerfile Nov 15, 2014
@ahmetb ahmetb mentioned this pull request Nov 16, 2014
@ahmetb
Copy link
Contributor

@ahmetb ahmetb commented Nov 16, 2014

@vlesierse please squash into one commit and git push -f

@vlesierse
Copy link
Contributor Author

@vlesierse vlesierse commented Nov 16, 2014

Done

@ahmetb ahmetb mentioned this pull request Nov 26, 2014
@vlesierse vlesierse closed this Mar 6, 2015
@vlesierse
Copy link
Contributor Author

@vlesierse vlesierse commented Mar 6, 2015

Closed this pull request for now and I will create a new one when we have concluded issue.
Proposal: ONBUILD image #19

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.