.NET Core Debian environment for developers running in a Docker container
219
docker run -it -v $(pwd):/app -p 5000:5000 civa86/docker-dotnet-dev <DOTNET_CLI_COMMAND>
The container uses dotnet executable as entrypoint.
It accepts all arguments you can give to the dotnet cli.
alias dotnet-dev='docker run -it -v $(pwd):/app -p 5000:5000 civa86/dotnet-dev'
docker run -v $(pwd):/app civa86/docker-dotnet-dev new webapi -n ExampleAspNetCore
This will create the ExampleAspNetCore folder inside your pwd directory with a working ASP.NET Core project inside.
docker run -it -v $(pwd):/app -p 5000:5000 civa86/docker-dotnet-dev watch run
Be sure to add Microsoft.DotNet.Watcher.Tools package reference to your .csproj project file
<ItemGroup>
<DotNetCliToolReference Include="Microsoft.DotNet.Watcher.Tools" Version="2.0.0" />
</ItemGroup>
docker run civa86/docker-dotnet-dev
The container will exec dotnet --info
.NET Command Line Tools (2.0.0)
Product Information:
Version: 2.0.0
Commit SHA-1 hash: cdcd1928c9
Runtime Environment:
OS Name: debian
OS Version: 9
OS Platform: Linux
RID: linux-x64
Base Path: /usr/share/dotnet/sdk/2.0.0/
Microsoft .NET Core Shared Framework Host
Version : 2.0.0
Build : e8b8861ac7faf042c87a5c2f9f2d04c98b69f28d
Content type
Image
Digest
Size
513.5 MB
Last updated
almost 9 years ago
docker pull civa86/dotnet-dev