New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added onbuild Dockerfile #7

Closed
wants to merge 0 commits into
base: master
from

Conversation

Projects
None yet
3 participants
@vlesierse
Contributor

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

This comment has been minimized.

Show comment
Hide comment
@ahmetb

ahmetb Nov 15, 2014

Contributor

@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.

Contributor

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

This comment has been minimized.

Show comment
Hide comment
@muojp

muojp Nov 15, 2014

Contributor

@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.

Contributor

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

This comment has been minimized.

Show comment
Hide comment
@vlesierse

vlesierse Nov 15, 2014

Contributor

@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?

Contributor

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 from Added onbuild Dockerfile and Kestrel fix to Added onbuild Dockerfile Nov 15, 2014

@ahmetb ahmetb referenced this pull request Nov 16, 2014

Closed

Add onbuild #11

@ahmetb

This comment has been minimized.

Show comment
Hide comment
@ahmetb

ahmetb Nov 16, 2014

Contributor

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

Contributor

ahmetb commented Nov 16, 2014

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

@vlesierse

This comment has been minimized.

Show comment
Hide comment
@vlesierse

vlesierse Nov 16, 2014

Contributor

Done

Contributor

vlesierse commented Nov 16, 2014

Done

@ahmetb ahmetb referenced this pull request Nov 26, 2014

Closed

Proposal: ONBUILD image #19

@vlesierse vlesierse closed this Mar 6, 2015

@vlesierse

This comment has been minimized.

Show comment
Hide comment
@vlesierse

vlesierse Mar 6, 2015

Contributor

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

Contributor

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 join this conversation on GitHub. Already have an account? Sign in to comment