|
1 | 1 | #See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging. |
2 | 2 | ARG BUILD_VERSION=3.5.0 |
3 | 3 |
|
4 | | -FROM mcr.microsoft.com/dotnet/aspnet:9.0.3-noble-amd64 AS base |
| 4 | +#FROM mcr.microsoft.com/dotnet/aspnet:9.0.3-noble-amd64 AS base |
| 5 | +FROM dhi.io/aspnetcore:9.0.16-debian13 AS base |
5 | 6 | ARG BUILD_VERSION |
6 | 7 | WORKDIR /app |
7 | 8 | EXPOSE 80 |
8 | 9 |
|
9 | 10 | #FROM node:18.19-alpine3.19 AS node_base |
10 | | -FROM mcr.microsoft.com/dotnet/sdk:9.0.202-noble-amd64 AS build |
| 11 | +#FROM mcr.microsoft.com/dotnet/sdk:9.0.202-noble-amd64 AS build |
| 12 | +FROM dhi.io/dotnet:9.0.314-sdk-debian13 AS build |
11 | 13 | #RUN apt-get update && apt-get install nodejs |
12 | 14 | #COPY --from=node_base . . |
13 | 15 | #COPY --from=node_base /usr/lib /usr/lib |
@@ -52,12 +54,12 @@ ENV PATH="${PATH}:/root/.dotnet/tools" |
52 | 54 | RUN for i in 1 2 3; do libman restore && break || { echo "libman restore attempt $i failed, retrying..."; sleep 10; }; done |
53 | 55 | ENV SKIP_LIBMAN_RESTORE=1 |
54 | 56 | RUN dotnet publish "Resgrid.Web.csproj" -c Release -o /app/publish -p:Version=${BUILD_VERSION} |
| 57 | +## Download the wait script in the build stage where a shell is available |
| 58 | +ADD https://github.com/ufoscout/docker-compose-wait/releases/download/2.9.0/wait /app/publish/wait |
| 59 | +RUN chmod +x /app/publish/wait |
55 | 60 |
|
56 | 61 | FROM base AS final |
57 | | -## Add the wait script to the image |
58 | | -ADD https://github.com/ufoscout/docker-compose-wait/releases/download/2.9.0/wait wait |
59 | | -RUN chmod +x wait |
60 | | - |
61 | 62 | WORKDIR /app |
62 | 63 | COPY --from=publish /app/publish . |
63 | | -ENTRYPOINT ["sh", "-c", "./wait && dotnet Resgrid.Web.dll"] |
| 64 | +ENTRYPOINT ["./wait"] |
| 65 | +CMD ["dotnet", "Resgrid.Web.dll"] |
0 commit comments