forked from sotsera/sotsera.blazor.toaster
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dockerfile
21 lines (19 loc) · 917 Bytes
/
dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
FROM mcr.microsoft.com/dotnet/core/sdk:3.0-buster AS build
WORKDIR /sources
COPY Directory.Build.props global.json ./
COPY src/Sotsera.Blazor.Toaster/Sotsera.Blazor.Toaster.csproj src/Sotsera.Blazor.Toaster/
COPY samples/ClientSide/ClientSide.csproj samples/ClientSide/
RUN dotnet restore src/Sotsera.Blazor.Toaster/Sotsera.Blazor.Toaster.csproj \
&& dotnet restore samples/ClientSide/ClientSide.csproj
COPY src/Sotsera.Blazor.Toaster src/Sotsera.Blazor.Toaster
COPY samples/ClientSide samples/ClientSide
RUN dotnet build samples/ClientSide/ClientSide.csproj -c Release
FROM build AS publish
RUN dotnet publish "samples/ClientSide/ClientSide.csproj" -c Release -o /publish
#FROM fholzer/nginx-brotli AS final
FROM nginx:alpine AS final
WORKDIR /usr/share/nginx/html
COPY --from=publish /publish/ClientSide/dist .
COPY --from=publish /publish/wwwroot .
#RUN chmod -R go-rw .
COPY nginx.conf /etc/nginx/nginx.conf