Code Monkey home page Code Monkey logo

coreapp's Introduction

dotnet-bot Sample

The dotnet-bot sample demonstrates "hello world" type usage of .NET Core. It displays dotnet-bot, the open source mascot for .NET Core projects. This sample is very similar to the Docker whalesay sample.

Topics

You will exercise the following topics in this sample.

  • Building and running a .NET Core application.
  • Creating a Docker image for a .NET Core application.
  • Running a .NET Core application in container.

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

  1. Restore dependencies: dotnet restore
  2. Run application: dotnet run
  3. Alternatively, you can build and directly run your application with the following two commands:
    • dotnet build
    • dotnet bin/Debug/netcoreapp1.0/dotnetbot.dll
  4. 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.

  1. Install the Docker tools for your operating system.
  2. Build a Docker container, as specified by the Dockerfile: docker build -t dotnetbot .
  3. Run the application in the container: docker run dotnetbot Hello .NET Core from Docker

coreapp

coreapp's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.