Skip to content

Provides docker-compose.yaml to launch a Docker container for .NET Core.

License

Notifications You must be signed in to change notification settings

ymasaoka/docker-dotnetcore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

docker-dotnetcore

Provides docker-compose.yaml to launch a Docker container for .NET Core.

How to use

  1. Clone this repository to a directory of your choice.

  2. Move to the docker-dotnetcore directory.

  3. Execute the following command to start the container.

    docker-compose up -d
  4. Run the following command to confirm that the container has started.

    docker-compose ps

Creating .NET Core project

Create a .NET Core project using the docker-compose command.

docker-compose run --rm app dotnet new console -o <YourProjectName>

For dotnet new command options like console, check here or use --help option to check it.
You can also see other dotnet commands here.

docker-compose run --rm app dotnet new --help

Execute .NET Core Project

The following command is an example of creating and executing a console application that displays Hello World! by using docker-compose command.

docker-compose run --rm app dotnet new console -o MyFirstProject
docker-compose run -w /usr/src/MyFirstProject --rm app dotnet run

The -w option specifies the directory in which to run the command inside the container.

Related Repos

The repository specified by image in docker-compose.yaml can be changed depending on the usage.
See the links below for more information.

Releases

No releases published

Packages

No packages published