All Downloads are FREE. Search and download functionalities are using the official Maven repository.

aspnetcore.2.1.Dockerfile.mustache Maven / Gradle / Ivy

There is a newer version: 3.0.0-rc1
Show newest version
FROM mcr.microsoft.com/dotnet/core/sdk:{{aspNetCoreVersion}} AS build-env
WORKDIR /app

ENV DOTNET_CLI_TELEMETRY_OPTOUT 1

# copy csproj and restore as distinct layers
COPY *.csproj ./
RUN dotnet restore

# copy everything else and build
COPY . ./
RUN dotnet publish -c Release -o out

# build runtime image
FROM mcr.microsoft.com/dotnet/core/aspnet:{{aspNetCoreVersion}}
WORKDIR /app
COPY --from=build-env /app/out .
ENTRYPOINT ["dotnet", "{{packageName}}.dll"]




© 2015 - 2024 Weber Informatics LLC | Privacy Policy