All Projects → brthor → Dockerize.net

brthor / Dockerize.net

Licence: mit
.NET Cli Tool to package your .NET Core Application into a docker image: 'dotnet dockerize'

Projects that are alternatives of or similar to Dockerize.net

awesome-dotnet-async
A curated list of awesome articles and resources to learning and practicing about async, threading, and channels in .Net platform. 😉
Stars: ✭ 84 (-48.15%)
Mutual labels:  netcore, asp-net-core
Netcorebbs
ASP.NET Core Light forum NETCoreBBS
Stars: ✭ 483 (+198.15%)
Mutual labels:  asp-net-core, netcore
netcore-wcf-service-proxy
Example of consuming multiple WCF services using a proxy implementation in a ASP.NET Core Web-application.
Stars: ✭ 42 (-74.07%)
Mutual labels:  netcore, asp-net-core
SQLiteEncryptionUsingEFCore
SQLite Encryption using Entity Framework Core (EFCore)
Stars: ✭ 42 (-74.07%)
Mutual labels:  netcore, asp-net-core
Formhelper
ASP.NET Core - Transform server-side validations to client-side without writing any javascript code. (Compatible with Fluent Validation)
Stars: ✭ 155 (-4.32%)
Mutual labels:  asp-net-core, netcore
SignalR-Core-SqlTableDependency
Shows how the new SignalR Core works with hubs and sockets, also how it can integrate with SqlTableDependency API.
Stars: ✭ 36 (-77.78%)
Mutual labels:  netcore, asp-net-core
Blog.identityserver
🥗 打造一个功能强大的通用型Ids4用户认证授权服务中心,配合之前的所有开源项目
Stars: ✭ 315 (+94.44%)
Mutual labels:  asp-net-core, netcore
grandnode2
Free, Open source, Fast, Headless, Multi-tenant eCommerce platform built with .NET Core, MongoDB, AWS DocumentDB, Azure CosmosDB, LiteDB, Vue.js.
Stars: ✭ 626 (+286.42%)
Mutual labels:  netcore, asp-net-core
Opentelemetry Dotnet
The OpenTelemetry .NET Client
Stars: ✭ 1,037 (+540.12%)
Mutual labels:  asp-net-core, netcore
Restfulsense
A RESTFul operations client that serializes responses and throws meaningful exceptions for >= 400 status codes.
Stars: ✭ 28 (-82.72%)
Mutual labels:  asp-net-core, netcore
FluentAssertions.Web
FluentAssertions for HTTP APIs
Stars: ✭ 71 (-56.17%)
Mutual labels:  netcore, asp-net-core
Gitserver
ASP.NET Core Git HTTP Server
Stars: ✭ 98 (-39.51%)
Mutual labels:  asp-net-core, netcore
Awesome-Nuget-Packages
📦 A collection of awesome and top .NET packages sorted by most popular needs.
Stars: ✭ 87 (-46.3%)
Mutual labels:  netcore, asp-net-core
Kodkod
https://github.com/alirizaadiyahsi/Nucleus Web API layered architecture startup template with ASP.NET Core 2.1, EF Core 2.1 and Vue Client
Stars: ✭ 45 (-72.22%)
Mutual labels:  netcore, asp-net-core
csharp
📚 Recursos para aprender C#
Stars: ✭ 37 (-77.16%)
Mutual labels:  netcore, asp-net-core
Simplcommerce
A simple, cross platform, modularized ecommerce system built on .NET Core
Stars: ✭ 3,474 (+2044.44%)
Mutual labels:  asp-net-core, netcore
statiq-starter-kontent-lumen
Lumen is a minimal, lightweight, and mobile-first starter for creating blogs using Statiq and Kontent by Kentico.
Stars: ✭ 22 (-86.42%)
Mutual labels:  netcore, asp-net-core
XAF Security E4908
This repository contains examples for Role-based Access Control, Permission Management, and OData / Web / REST API Services for Entity Framework and XPO ORM
Stars: ✭ 47 (-70.99%)
Mutual labels:  netcore, asp-net-core
Signalrsample
Real-time Charts with ASP.NET Core SignalR and Chart.js.
Stars: ✭ 23 (-85.8%)
Mutual labels:  asp-net-core, netcore
Efcoreinaction Secondedition
Supporting repo to go with book "Entity Framework Core in Action", second edition
Stars: ✭ 96 (-40.74%)
Mutual labels:  asp-net-core, netcore

Dockerize.NET: Your .NET Core App to a docker image

Build Status Nuget Version Number

dotnet dockerize -t brthor/serviceWorker:dev

This is a simple dotnet cli tool that enables you to easily package your dotnet app into a docker container. The above invocation creates a docker image with the tag brthor/serviceWorker:dev which you can then docker push to your registry or docker run locally.

The image simply runs the static void Main(string[] args) or other entrypoint of your app.

This has many uses:

  • Getting a service image ready for kubernetes environment
  • Testing your application in different OS's available in docker
  • Isolated environments for your app.

Installation

It's easy, add the following to your *.csproj file:

<ItemGroup>
  <DotNetCliToolReference Include="Brthor.Dockerize.NET" Version="1.0.0-*" />
</ItemGroup>

Then dotnet restore, followed by dotnet dockerize to make your docker image. The default tag is the project name.

Options

See dotnet dockerize -h for available options.

$ dotnet dockerize -h

Usage:  [options]

Options:
  -t |--tag <tag>      The desired tag name of the created image. Will be directly passed to docker build -t, see docker build --help for more info. Defaults to the project name.

  -r |--runtime <RID>  The RID of the specified Base Docker image. Defaults to "linux-x64".

  -i |--image <image>  The base docker image used for the generated docker file. If you change this from the default, be sure toupdate BaseRid if appropriate. Defaults to "microsoft/dotnet:2.0-runtime".

  -? | -h | --help     Show help information

Example

$ mkdir newApp
$ cd newApp
$ dotnet new console
The template "Console Application" was created successfully.

... etc output...

At this point you need to edit newApp.csproj and add the tool reference from above, and the whole file will look like:

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>netcoreapp2.0</TargetFramework>
  </PropertyGroup>
  <ItemGroup>
    <DotNetCliToolReference Include="Brthor.Dockerize.NET" Version="1.0.0-*" />
  </ItemGroup>
</Project>

Continuing on the command line:

$ dotnet dockerize
Dockerize Config
Base Docker Image: microsoft/dotnet:2.0-runtime
Base Rid of Docker Image: linux-x64
Tag: newApp

... etc output...

$ docker run -it newApp
Hello World!

Contributing

There's a lot of room for improvement, especially with customization of the underlying dockerfile. Feel free to create pull requests for additional features.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].