Coder Social home page Coder Social logo

dotnet-publish-docker's Introduction

.NET Core Docker Publisher

Publish your application to a Docker image using the .NET CLI

Build Status NuGet Pre Release

Prerequisites

Use the .NET Core Docker Publisher

Setting up your project to use the Docker publisher is very easy. These steps should get you up and running in no time.

The tool will create a Dockerfile next to your published application and execute docker build to create an Docker image.

Change project.json

Next, you should change your project.json file and add the dotnet-publish-docker package to tools and add the dotnet publish-docker to the post-publish script.

"tools": {
  "dotnet-publish-docker": "1.0.0-preview1"
},
"scripts": {
  "postpublish": "dotnet publish-docker --publish-folder %publish:OutputPath%"
}

It's possible to create your own base Docker image and use this as --base-image parameter.

Publish your project

Now you're able to publish your application and you should see it creates a Docker image for your.

dotnet publish

Run your Docker image

With the Docker CLI you should see your image and will be able to run it.

docker images
docker run --rm <appname>

dotnet-publish-docker's People

Contributors

vlesierse avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

dotnet-publish-docker's Issues

Update Nuget package for 1.0.0

The Nuget package still currently relies on Microsoft.NETCore.App (>= 1.0.0-rc2-3002702) would be great to get it updated to use 1.0.0

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.