title: How can I install java runtime from dockerfile for C# project?
body: <p>I want to install Java runtime from my dockerfile for my C# project. Can anyone help me?Currently I have this dockerfile which is working on dotnet core3.1</p>
  <pre><code>   FROM  public.ecr.aws/lambda/dotnet:core3.1 AS base
  WORKDIR /app
  
  FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster AS build
  WORKDIR .
  COPY [&quot;ScenarioRunner/ScenarioRunner.csproj&quot;, &quot;ScenarioRunner/&quot;]
  COPY [&quot;Scenarios/Scenarios.csproj&quot;, &quot;Scenarios/&quot;]
  RUN dotnet restore &quot;ScenarioRunner/ScenarioRunner.csproj&quot;
  COPY . .
  WORKDIR &quot;ScenarioRunner&quot;
  RUN dotnet build &quot;ScenarioRunner.csproj&quot; -c Release -o /app/build
  
  FROM build AS publish
  RUN dotnet publish &quot;ScenarioRunner.csproj&quot; -c Release -o /app/publish
  
  FROM base AS final
  WORKDIR /var/task
  COPY --from=publish /app/publish .
  CMD [&quot;ScenarioRunner::ScenarioRunner.ScenarioRunnerFunction::FunctionHandlerAsync&quot;]
  </code></pre>