{"id":25439375,"url":"https://github.com/brthor/dockerize.net","last_synced_at":"2025-11-01T09:30:21.682Z","repository":{"id":26375250,"uuid":"108624811","full_name":"brthor/Dockerize.NET","owner":"brthor","description":".NET Cli Tool to package your .NET Core Application into a docker image: 'dotnet dockerize'","archived":false,"fork":false,"pushed_at":"2022-12-07T18:28:42.000Z","size":32,"stargazers_count":175,"open_issues_count":5,"forks_count":8,"subscribers_count":17,"default_branch":"master","last_synced_at":"2024-12-03T02:11:35.512Z","etag":null,"topics":["asp-net-core","docker","netcore","netcoreapp"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brthor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-10-28T06:17:45.000Z","updated_at":"2024-10-23T23:33:28.000Z","dependencies_parsed_at":"2023-01-14T04:31:33.302Z","dependency_job_id":null,"html_url":"https://github.com/brthor/Dockerize.NET","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brthor%2FDockerize.NET","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brthor%2FDockerize.NET/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brthor%2FDockerize.NET/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brthor%2FDockerize.NET/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brthor","download_url":"https://codeload.github.com/brthor/Dockerize.NET/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239269779,"owners_count":19610871,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["asp-net-core","docker","netcore","netcoreapp"],"created_at":"2025-02-17T10:19:13.525Z","updated_at":"2025-11-01T09:30:21.562Z","avatar_url":"https://github.com/brthor.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dockerize.NET: Your .NET Core App to a docker image\n\n[![Build Status](https://travis-ci.org/brthor/Dockerize.NET.svg?branch=master)](https://travis-ci.org/brthor/Dockerize.NET)\n[![Nuget Version Number](https://img.shields.io/nuget/v/Brthor.Dockerize.NET.svg)](https://www.nuget.org/packages/Brthor.Dockerize.NET)\n\n`dotnet dockerize -t brthor/serviceWorker:dev`\n\nThis 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.\n\nThe image simply runs the `static void Main(string[] args)` or other entrypoint of your app.\n\nThis has many uses:\n - Getting a service image ready for kubernetes environment\n - Testing your application in different OS's available in docker\n - Isolated environments for your app.\n \n## Installation\n \n It's easy, add the following to your `*.csproj` file:\n ```XML\n \u003cItemGroup\u003e\n   \u003cDotNetCliToolReference Include=\"Brthor.Dockerize.NET\" Version=\"1.0.0-*\" /\u003e\n \u003c/ItemGroup\u003e\n ```\n\n Then `dotnet restore`, followed by `dotnet dockerize` to make your docker image. The default tag is the project name.\n\n## Options\n\nSee `dotnet dockerize -h` for available options.\n\n```\n$ dotnet dockerize -h\n\nUsage:  [options]\n\nOptions:\n  -t |--tag \u003ctag\u003e      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.\n\n  -r |--runtime \u003cRID\u003e  The RID of the specified Base Docker image. Defaults to \"linux-x64\".\n\n  -i |--image \u003cimage\u003e  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\".\n\n  -? | -h | --help     Show help information\n```\n\n## Example \n\n```bash\n$ mkdir newApp\n$ cd newApp\n$ dotnet new console\nThe template \"Console Application\" was created successfully.\n\n... etc output...\n\n```\n\nAt this point you need to edit `newApp.csproj` and add the tool reference from above, and the whole file will look like:\n\n```XML\n\u003cProject Sdk=\"Microsoft.NET.Sdk\"\u003e\n  \u003cPropertyGroup\u003e\n    \u003cOutputType\u003eExe\u003c/OutputType\u003e\n    \u003cTargetFramework\u003enetcoreapp2.0\u003c/TargetFramework\u003e\n  \u003c/PropertyGroup\u003e\n  \u003cItemGroup\u003e\n    \u003cDotNetCliToolReference Include=\"Brthor.Dockerize.NET\" Version=\"1.0.0-*\" /\u003e\n  \u003c/ItemGroup\u003e\n\u003c/Project\u003e\n```\n\nContinuing on the command line:\n\n```bash\n$ dotnet dockerize\nDockerize Config\nBase Docker Image: microsoft/dotnet:2.0-runtime\nBase Rid of Docker Image: linux-x64\nTag: newApp\n\n... etc output...\n\n$ docker run -it newApp\nHello World!\n```\n\n## Contributing\n\nThere's a lot of room for improvement, especially with customization of the underlying dockerfile. \nFeel free to create pull requests for additional features.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrthor%2Fdockerize.net","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrthor%2Fdockerize.net","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrthor%2Fdockerize.net/lists"}