-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (19 loc) · 776 Bytes
/
Copy pathDockerfile
File metadata and controls
29 lines (19 loc) · 776 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
RUN apt update; \
apt install minify
WORKDIR /app
COPY ./src ./
RUN minify -o ./wwwroot/dist/style.css ./wwwroot/dist/style.css; \
minify -o ./wwwroot/lib/leaflet/leaflet.css ./wwwroot/lib/leaflet/leaflet.css; \
mkdir ./wwwroot/dist/scripts/minified; \
minify -r -o ./wwwroot/dist/scripts/minified --match="*.js" -- ./wwwroot/dist/scripts/; \
mv -f ./wwwroot/dist/scripts/minified/* ./wwwroot/dist/scripts/; \
rm -r ./wwwroot/dist/scripts/minified
RUN dotnet restore; \
dotnet publish checkin.csproj --configuration Release --output ./out
FROM mcr.microsoft.com/dotnet/aspnet:10.0
WORKDIR /app
COPY --from=build /app/out .
EXPOSE 8080
VOLUME [ "/data" ]
ENTRYPOINT ["dotnet", "checkin.dll"]