-
Notifications
You must be signed in to change notification settings - Fork 345
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
42 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,17 @@ | ||
<Project Sdk="Microsoft.NET.Sdk.Web"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net6</TargetFramework> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\..\..\src\Dapr.Actors.AspNetCore\Dapr.Actors.AspNetCore.csproj" /> | ||
<ProjectReference Include="..\..\..\src\Dapr.Actors\Dapr.Actors.csproj" /> | ||
<ProjectReference Include="..\IDemoActor\IDemoActor.csproj" /> | ||
</ItemGroup> | ||
<PropertyGroup> | ||
<TargetFramework>net6</TargetFramework> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.20.1" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\..\..\src\Dapr.Actors.AspNetCore\Dapr.Actors.AspNetCore.csproj" /> | ||
<ProjectReference Include="..\..\..\src\Dapr.Actors\Dapr.Actors.csproj" /> | ||
<ProjectReference Include="..\IDemoActor\IDemoActor.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
FROM mcr.microsoft.com/dotnet/aspnet:6.0-jammy-chiseled AS base | ||
WORKDIR /app | ||
EXPOSE 5010 | ||
|
||
FROM mcr.microsoft.com/dotnet/sdk:6.0-jammy AS build | ||
WORKDIR / | ||
# Copy base projects | ||
COPY ["examples/Actor/DemoActor/", "examples/Actor/DemoActor/"] | ||
# Copy shared dependencies | ||
COPY ["examples/Actor/IDemoActor/", "examples/Actor/IDemoActor/"] | ||
COPY ["src/Dapr.Actors/", "src/Dapr.Actors/"] | ||
COPY ["src/Dapr.Actors.AspNetCore/", "src/Dapr.Actors.AspNetCore/"] | ||
COPY ["src/Dapr.Client/", "src/Dapr.Client/"] | ||
# Restore the project and build it | ||
WORKDIR "/examples/Actor/DemoActor" | ||
RUN dotnet restore "DemoActor.csproj" | ||
RUN dotnet build "DemoActor.csproj" -c Release -o /app/build | ||
|
||
# Publish the project | ||
FROM build AS publish | ||
RUN dotnet publish "DemoActor.csproj" -c Release -o /app/publish | ||
|
||
FROM base AS final | ||
WORKDIR /app | ||
# Set environment variables | ||
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false | ||
# Copy published files | ||
COPY --from=publish /app/publish . | ||
ENTRYPOINT ["dotnet", "DemoActor.dll"] |