From b2f4f20fabd0b68e5ddb2a8a9e04fd771b035eec Mon Sep 17 00:00:00 2001 From: Next Turn <45985406+NextTurn@users.noreply.github.com> Date: Sat, 9 Mar 2019 11:53:38 +0800 Subject: [PATCH] Update dotnet-bot sample for .NET Core 2.1 (#2409) --- samples/dotnetbot/README.md | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/samples/dotnetbot/README.md b/samples/dotnetbot/README.md index f48878184..9187b51ac 100644 --- a/samples/dotnetbot/README.md +++ b/samples/dotnetbot/README.md @@ -1,10 +1,8 @@ -dotnet-bot Sample -================ +# dotnet-bot Sample The dotnet-bot sample demonstrates "hello world" type usage of .NET Core. It displays [dotnet-bot](https://github.com/dotnet-bot), the open source mascot for .NET Core projects. This sample is very similar to the Docker [whalesay](https://docs.docker.com/engine/getstarted/step_three/) sample. -Topics ------- +## Topics You will exercise the following topics in this sample. @@ -12,30 +10,28 @@ You will exercise the following topics in this sample. - Creating a Docker image for a .NET Core application. - Running a .NET Core application in container. -Script ------- +## Script Follow these steps to try out this sample. The instructions are intended to be Operating System agnostic, unless called out. **Preparing your Environment** -1. Install the [.NET Core SDK](https://dot.net/core) for your operating system. +1. Install the [.NET Core SDK](https://dot.net/core) (2.1 or higher) for your operating system. 2. Git clone this repository or otherwise copy this sample to your machine: `git clone https://github.com/dotnet/core/` 3. Navigate to the sample on your machine at the command prompt or terminal. **Run the application** -4. Restore dependencies: `dotnet restore` -5. Run application: `dotnet run` -6. Alternatively, you can build and directly run your application with the following two commands: +4. Run application: `dotnet run` +5. Alternatively, you can build and directly run your application with the following two commands: - `dotnet build` - - `dotnet bin/Debug/netcoreapp1.0/dotnetbot.dll` -7. You can also try passing input to the sample to get the dotnet-bot to say something: `dotnet run dotnet-bot is a great teacher` + - `dotnet bin/Debug/netcoreapp2.1/dotnetbot.dll` +6. You can also try passing input to the sample to get the dotnet-bot to say something: `dotnet run dotnet-bot is a great teacher` **Dockerize the application** The Docker instructions are OS agnostic, however, the Dockerfile used relies on a Linux image. -8. Install the [Docker tools](https://www.docker.com/products/docker) for your operating system. -9. Build a Docker container, as specified by the [Dockerfile](Dockerfile): `docker build -t dotnetbot .` -10. Run the application in the container: `docker run dotnetbot Hello .NET Core from Docker` +7. Install the [Docker tools](https://www.docker.com/products/docker) for your operating system. +8. Build a Docker container, as specified by the [Dockerfile](Dockerfile): `docker build -t dotnetbot .` +9. Run the application in the container: `docker run dotnetbot Hello .NET Core from Docker`