18 lines
458 B
Docker
18 lines
458 B
Docker
# Build stage
|
|
FROM mcr.microsoft.com/dotnet/sdk:10.0-alpine AS build
|
|
WORKDIR /src
|
|
|
|
COPY UI.csproj ./
|
|
RUN dotnet restore
|
|
|
|
COPY . ./
|
|
RUN dotnet build -c Release -o /build
|
|
RUN dotnet publish -c Release -o /app/publish /p:BlazorWebAssemblyLoadAllGlobalizationData=true
|
|
|
|
# Serve with nginx
|
|
FROM nginx:alpine AS runtime
|
|
COPY --from=build /app/publish/wwwroot /usr/share/nginx/html
|
|
COPY nginx.conf /etc/nginx/nginx.conf
|
|
EXPOSE 80
|
|
CMD ["nginx", "-g", "daemon off;"]
|