Public Repository

Last pushed: 8 months ago
Short Description
ASP.NET Core Base Image
Full Description

DotNetCoreBase

Polynomial base docker image for .NET Core projects.

Tags and Versions

A new version of the image should be released and tagged for any version of the .NET Core framework that is used in Polynomial and Kairos projects, and should mirror the framework versions.

Sample Project Dockerfile

FROM vallis/dotnetcorebase:1.1.1

ENV PROJECT_NAME MyApplicationName
WORKDIR /tmp/$PROJECT_NAME/
COPY src/$PROJECT_NAME/project.json /tmp/$PROJECT_NAME/
RUN dotnet restore
COPY src/$PROJECT_NAME/. /tmp/$PROJECT_NAME/
RUN dotnet publish -c Release -o Build && \
    cp -ar /tmp/$PROJECT_NAME/Build/. /app/ && \
    rm -rf /tmp/$PROJECT_NAME/
EXPOSE 5000/tcp
WORKDIR /app/
ENTRYPOINT dotnet /app/$PROJECT_NAME.dll

Project Name Environment Variable

Generally the only change required from the sample project Dockerfile will be setting the $PROJECT_NAME environment variable correctly. This will ensure the project path can be found and output DLL file is named correctly.

Version History

Versions v1.0.0 and v1.1.0 use project.json style project files. All newer versions use .csproj.

  • 1.1.1 - 7 Mar 2017
  • 1.1.0 - 16 Nov 2016
  • 1.0.0 - 15 Nov 2016
Docker Pull Command
Owner
vallis