ci: Containerization of the app #2
1 changed files with 31 additions and 0 deletions
31
Dockerfile
Normal file
31
Dockerfile
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
|
||||||
|
WORKDIR /src
|
||||||
|
|
||||||
|
COPY ["turf_tasker/turf_tasker.csproj", "turf_tasker/"]
|
||||||
|
RUN dotnet restore "turf_tasker/turf_tasker.csproj"
|
||||||
|
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
WORKDIR "/src/turf_tasker"
|
||||||
|
|
||||||
|
RUN dotnet build "turf_tasker.csproj" -c Release -o /app/build
|
||||||
|
|
||||||
|
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS publish
|
||||||
|
WORKDIR /src
|
||||||
|
|
||||||
|
COPY --from=build "/src/turf_tasker/turf_tasker.csproj" "turf_tasker/"
|
||||||
|
RUN dotnet restore "turf_tasker/turf_tasker.csproj"
|
||||||
|
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
WORKDIR "/src/turf_tasker"
|
||||||
|
RUN dotnet publish "turf_tasker.csproj" -c Release -o /app/publish /p:UserAppHost=false
|
||||||
|
|
||||||
|
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS final
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
COPY --from=publish /app/publish .
|
||||||
|
|
||||||
|
COPY turf_tasker.db .
|
||||||
|
|
||||||
|
ENTRYPOINT ["dotnet", "turf_tasker.dll"]
|
||||||
Loading…
Add table
Add a link
Reference in a new issue