change dotnet build images in Dockerfile
	
		
			
	
		
	
	
		
	
		
			Some checks failed
		
		
	
	
		
			
				
	
				Build and Push Server Docker Image / build-server (push) Failing after 21s
				
			
		
		
	
	
				
					
				
			
		
			Some checks failed
		
		
	
	Build and Push Server Docker Image / build-server (push) Failing after 21s
				
			This commit is contained in:
		@@ -1,23 +1,18 @@
 | 
			
		||||
FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS base
 | 
			
		||||
USER $APP_UID
 | 
			
		||||
WORKDIR /app
 | 
			
		||||
EXPOSE 8080
 | 
			
		||||
EXPOSE 8081
 | 
			
		||||
FROM mcr.microsoft.com/dotnet/sdk:10.0.100-preview.7-alpine3.22-aot
 | 
			
		||||
 AS build
 | 
			
		||||
 | 
			
		||||
# Install NativeAOT build prerequisites
 | 
			
		||||
RUN apk update \
 | 
			
		||||
    && apk add --no-cache \
 | 
			
		||||
       clang zlib-dev 
 | 
			
		||||
 | 
			
		||||
WORKDIR /source
 | 
			
		||||
 | 
			
		||||
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
 | 
			
		||||
ARG BUILD_CONFIGURATION=Release
 | 
			
		||||
WORKDIR /src
 | 
			
		||||
COPY ["VirtualDDNSRouter.Server/VirtualDDNSRouter.Server.csproj", "VirtualDDNSRouter.Server/"]
 | 
			
		||||
RUN dotnet restore "VirtualDDNSRouter.Server/VirtualDDNSRouter.Server.csproj"
 | 
			
		||||
COPY . .
 | 
			
		||||
WORKDIR "/src/VirtualDDNSRouter.Server"
 | 
			
		||||
RUN dotnet build "./VirtualDDNSRouter.Server.csproj" -c $BUILD_CONFIGURATION -o /app/build
 | 
			
		||||
RUN cd 'VirtualDDNSRouter.Server' && dotnet publish -r linux-musl-x64 -o /app 'VirtualDDNSRouter.Server.csproj'
 | 
			
		||||
 | 
			
		||||
FROM build AS publish
 | 
			
		||||
ARG BUILD_CONFIGURATION=Release
 | 
			
		||||
RUN dotnet publish "./VirtualDDNSRouter.Server.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
 | 
			
		||||
FROM mcr.microsoft.com/dotnet/runtime-deps:10.0.0-preview.7-alpine3.22
 | 
			
		||||
 | 
			
		||||
FROM base AS final
 | 
			
		||||
WORKDIR /app
 | 
			
		||||
COPY --from=publish /app/publish .
 | 
			
		||||
ENTRYPOINT ["dotnet", "VirtualDDNSRouter.Server.dll"]
 | 
			
		||||
COPY --from=build /app .
 | 
			
		||||
ENTRYPOINT ["/app/VirtualDDNSRouter.Server"]
 | 
			
		||||
		Reference in New Issue
	
	Block a user