- Notifications
You must be signed in to change notification settings - Fork 167
Update README.md #156
Update README.md #156
Conversation
Add usage example and a note about ports.
| Shouldn't this be in a README in the root of the repo? Seems applicable to all images |
| The README is specific to the image, it cannot be in the root |
| We should have a README in the root I suppose, I will do another PR. |
1.0.1/jessie/product/README.md Outdated
| | ||
| ``` | ||
| $ docker build -t myapp . | ||
| $ docker run -d -P myapp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You might confuse people by using the publish-all flag. I'd much rather call out an explicit port e.g., -p 8000:80.
1.0.1/jessie/product/README.md Outdated
| ``` | ||
| FROM microsoft/aspnetcore | ||
| WORKDIR /app | ||
| ADD /app |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've not seen ADD used with only one arg. Did you intend for a '.' someplace?
Aside from that, I would suggest using COPY vs ADD per the Dockerfile best practices.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definately, I typed this directly in the browser. Will change to COPY and add ..
1.0.1/jessie/product/README.md Outdated
| ``` | ||
| FROM microsoft/aspnetcore | ||
| WORKDIR /app | ||
| COPY . /app |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no objection to this but I personally prefer COPY . . mainly because it makes changing the application directory easier since it is only specified in one place. Since this is a sample, I would think there is a good chance people would copy and tweak it - such as change the app directory name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmmm. That's a fair call. I have always preferred being explicit about it, COPY . . seemed like crazy magic. But I totally buy your argument and think I'll change it.
| Added an update to the README of the build image. Need comments on the TODO statement I left there if nothing else :) |
1.0.1/jessie/build/README.md Outdated
| | ||
| Now you have built your ASP.NET Core application inside a container and have the published output on the host ready to deploy. From here you could then construct an optimized runtime image with the `microsoft/aspnetcore` image or just deploy/run the binaries as normal without using Docker at runtime. | ||
| | ||
| ###TODO: I think everything below this line we could cut, and maybe have them as an example in a samples repo. In fact I think a set of samples that show using this technique end-to-end should be published. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, we are going this way with the dotnet-docker and dotnet-docker-samples repos. FYI - The samples are still very much a WIP.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Richard sent me a link to that, I am about to send a PR to it to start a sample that does what I am describing here with a console app and the dotnet images.
| Agreed. Everything below the TODO needs to live in a doc with an accompanying sample. |
| @shirhatti There is a discussion now with the team concerning a doc for the CI tutorials. |
Add usage example and a note about ports.
@MichaelSimons, @troydai, @shirhatti