Created
October 28, 2022 02:11
-
-
Save timheuer/b5d92b4f8b65d766b52e8e574bff925b to your computer and use it in GitHub Desktop.
blazor-front-end-container
This file contains hidden or 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
FROM nginx:latest AS base | |
WORKDIR /app | |
EXPOSE 80 | |
EXPOSE 443 | |
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build | |
WORKDIR /src | |
COPY ["BlazorApp47/BlazorApp47.csproj", "BlazorApp47/"] | |
RUN dotnet restore "BlazorApp47/BlazorApp47.csproj" | |
COPY . . | |
WORKDIR "/src/BlazorApp47" | |
RUN dotnet build "BlazorApp47.csproj" -c Release -o /app/build | |
FROM build AS publish | |
RUN dotnet publish "BlazorApp47.csproj" -c Release -o /app/publish | |
FROM base AS final | |
WORKDIR /app | |
COPY --from=publish /app/publish/wwwroot /usr/share/nginx/html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment