|
1 | | -# syntax=docker/dockerfile:1 |
2 | | -FROM mcr.microsoft.com/dotnet/aspnet:10.0-alpine3.22 |
3 | 1 | ARG GIT_SHA |
| 2 | + |
| 3 | +FROM mcr.microsoft.com/dotnet/sdk:10.0-alpine3.23@sha256:732cd42c6f659814c9804ad7b05c7f761e83ef8379c5b2fdc3af673353caff73 AS build |
| 4 | +WORKDIR /source |
| 5 | + |
| 6 | +COPY . ./ |
| 7 | +RUN dotnet tool restore |
| 8 | +RUN dotnet restore |
| 9 | +RUN dotnet publish --no-restore --configuration Release |
| 10 | + |
| 11 | +FROM mcr.microsoft.com/dotnet/aspnet:10.0-alpine3.23@sha256:1201dde897ab436b7c6b386f6dbd4f9a3ca0245f9c5a8aac8f8bcdccb4c7d484 |
| 12 | +WORKDIR /Apps |
| 13 | +COPY --from=build /source/src/TeachingRecordSystem.Api/bin/Release/net10.0/publish/ ./Api/ |
| 14 | +COPY --from=build /source/src/TeachingRecordSystem.Cli/bin/Release/net10.0/publish/ ./TrsCli/ |
| 15 | +COPY --from=build /source/src/TeachingRecordSystem.SupportUi/bin/Release/net10.0/publish/ ./SupportUi/ |
| 16 | +COPY --from=build /source/src/TeachingRecordSystem.Worker/bin/Release/net10.0/publish/ ./Worker/ |
| 17 | +COPY --from=build /source/src/TeachingRecordSystem.AuthorizeAccess/bin/Release/net10.0/publish/ ./AuthorizeAccess/ |
| 18 | +COPY --from=build /source/db.sh . |
| 19 | + |
| 20 | +RUN chmod +x ./db.sh |
| 21 | + |
4 | 22 | ENV SENTRY_RELEASE=${GIT_SHA} |
5 | 23 | ENV GIT_SHA=${GIT_SHA} |
6 | 24 | ENV ASPNETCORE_HTTP_PORTS=3000 |
7 | | -COPY src/TeachingRecordSystem.Api/bin/Release/net10.0/publish/ Apps/Api/ |
8 | | -COPY src/TeachingRecordSystem.Cli/bin/Release/net10.0/publish/ Apps/TrsCli/ |
9 | | -COPY src/TeachingRecordSystem.SupportUi/bin/Release/net10.0/publish/ Apps/SupportUi/ |
10 | | -COPY src/TeachingRecordSystem.Worker/bin/Release/net10.0/publish/ Apps/Worker/ |
11 | | -COPY src/TeachingRecordSystem.AuthorizeAccess/bin/Release/net10.0/publish/ Apps/AuthorizeAccess/ |
12 | | -COPY db.sh Apps/db.sh |
13 | | -WORKDIR /Apps |
14 | | - |
15 | | -RUN chmod +x /Apps/db.sh |
| 25 | +ENV PATH="${PATH}:/Apps/TrsCli" |
16 | 26 |
|
17 | 27 | # Install Culture prerequisities |
18 | 28 | RUN apk add --no-cache \ |
@@ -42,5 +52,3 @@ RUN apk add --allow-untrusted msodbcsql18_18.0.1.1-1_amd64.apk && \ |
42 | 52 | RUN addgroup -S appgroup -g 20001 && adduser -S appuser -G appgroup -u 10001 |
43 | 53 |
|
44 | 54 | USER 10001 |
45 | | - |
46 | | -ENV PATH="${PATH}:/Apps/TrsCli" |
|
0 commit comments