Skip to content

Instantly share code, notes, and snippets.

@SpicySyntax
Created March 28, 2019 14:33
Show Gist options
  • Save SpicySyntax/5c8484e3505ec5e753e787344bb389ea to your computer and use it in GitHub Desktop.
Save SpicySyntax/5c8484e3505ec5e753e787344bb389ea to your computer and use it in GitHub Desktop.
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<AzureFunctionsVersion>V2</AzureFunctionsVersion>
<Platforms>x64</Platforms>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.Storage" Version="3.0.0" />
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="1.0.24" />
<PackageReference Include="MongoDB.Driver" Version="2.7.3" />
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
<PackageReference Include="WindowsAzure.Storage" Version="9.3.3" />
<PackageReference Include="CNTK.CPUOnly" Version="2.6.0" />
<PackageReference Include="SixLabors.ImageSharp" Version="1.0.0-beta0006" />
</ItemGroup>
<ItemGroup>
<None Update="host.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="vgg16-crack.onnx">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="local.settings.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>Never</CopyToPublishDirectory>
</None>
</ItemGroup>
</Project>
FROM microsoft/dotnet:2.2-sdk AS installer-env
COPY . /src/dotnet-function-app
RUN cd /src/dotnet-function-app && \
mkdir -p /home/site/wwwroot && \
dotnet publish -p:Platform=x64 *.csproj --output /home/site/wwwroot
FROM mcr.microsoft.com/azure-functions/dotnet:2.0
ENV AzureWebJobsScriptRoot=/home/site/wwwroot
COPY --from=installer-env ["/home/site/wwwroot", "/home/site/wwwroot"]
{
"version": "2.0"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment