ci: Containerization of the app #2
					 1 changed files with 10 additions and 7 deletions
				
			
		
							
								
								
									
										17
									
								
								Dockerfile
									
										
									
									
									
								
							
							
						
						
									
										17
									
								
								Dockerfile
									
										
									
									
									
								
							|  | @ -1,24 +1,27 @@ | ||||||
|  | # RUN WITH docker run -e "ASPNETCORE_URLS=http://+:80" -p 8080:80 turf-tasker-app | ||||||
|  | # This is only temporary | ||||||
|  | 
 | ||||||
| FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build | FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build | ||||||
| WORKDIR /src | WORKDIR /src | ||||||
| 
 | 
 | ||||||
| COPY ["turf_tasker/turf_tasker.csproj", "turf_tasker/"] | COPY ["turf_tasker.csproj", "./"] | ||||||
| RUN dotnet restore "turf_tasker/turf_tasker.csproj" | RUN dotnet restore "turf_tasker.csproj" | ||||||
| 
 | 
 | ||||||
| COPY . . | COPY . . | ||||||
| 
 | 
 | ||||||
| WORKDIR "/src/turf_tasker" | WORKDIR "/src" | ||||||
| 
 | 
 | ||||||
| RUN dotnet build "turf_tasker.csproj" -c Release -o /app/build | RUN dotnet build "turf_tasker.csproj" -c Release -o /app/build | ||||||
| 
 | 
 | ||||||
| FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS publish | FROM mcr.microsoft.com/dotnet/sdk:8.0 AS publish | ||||||
| WORKDIR /src | WORKDIR /src | ||||||
| 
 | 
 | ||||||
| COPY --from=build "/src/turf_tasker/turf_tasker.csproj" "turf_tasker/" | COPY --from=build "/src/turf_tasker.csproj" "./" | ||||||
| RUN dotnet restore "turf_tasker/turf_tasker.csproj" | RUN dotnet restore "turf_tasker.csproj" | ||||||
| 
 | 
 | ||||||
| COPY . . | COPY . . | ||||||
| 
 | 
 | ||||||
| WORKDIR "/src/turf_tasker" | WORKDIR "/src" | ||||||
| RUN dotnet publish "turf_tasker.csproj" -c Release -o /app/publish /p:UserAppHost=false | RUN dotnet publish "turf_tasker.csproj" -c Release -o /app/publish /p:UserAppHost=false | ||||||
| 
 | 
 | ||||||
| FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS final | FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS final | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue