fix: improve Docker build refs NOISSUE
This commit is contained in:
		
							
								
								
									
										15
									
								
								Dockerfile
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								Dockerfile
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,15 @@
 | 
			
		||||
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
 | 
			
		||||
WORKDIR /App
 | 
			
		||||
 | 
			
		||||
# Copy everything
 | 
			
		||||
COPY . ./
 | 
			
		||||
# Restore as distinct layers
 | 
			
		||||
RUN dotnet restore --project ./song_of_the_day/song_of_the_day.csproj
 | 
			
		||||
# Build and publish a release
 | 
			
		||||
RUN dotnet publish --project ./song_of_the_day/song_of_the_day.csproj -o out
 | 
			
		||||
 | 
			
		||||
# Build runtime image
 | 
			
		||||
FROM mcr.microsoft.com/dotnet/aspnet:9.0
 | 
			
		||||
WORKDIR /App
 | 
			
		||||
COPY --from=build /App/out .
 | 
			
		||||
ENTRYPOINT ["dotnet", "song_of_the_day.dll"]
 | 
			
		||||
		Reference in New Issue
	
	Block a user