Compare commits
2 Commits
e1b62bb4ac
...
b238d3214d
| Author | SHA1 | Date | |
|---|---|---|---|
| b238d3214d | |||
| f269208cbc |
32
Dockerfile
Normal file
32
Dockerfile
Normal file
@ -0,0 +1,32 @@
|
||||
# Stage 1: Base runtime
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS base
|
||||
WORKDIR /app
|
||||
EXPOSE 8080
|
||||
|
||||
# Stage 2: Build
|
||||
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
|
||||
WORKDIR /src
|
||||
|
||||
# Copy the solution file
|
||||
COPY ["ImperialRecruitment.sln", "./"]
|
||||
|
||||
# Copy all project files (so restore works with project references)
|
||||
COPY ["IR.Blazor/IR.Blazor.csproj", "IR.Blazor/"]
|
||||
COPY ["IR.Data/IR.Data.csproj", "IR.Data/"]
|
||||
COPY ["IR.Domain/IR.Domain.csproj", "IR.Domain/"]
|
||||
|
||||
# Restore packages
|
||||
RUN dotnet restore "./ImperialRecruitment.sln"
|
||||
|
||||
# Copy the rest of the source
|
||||
COPY . .
|
||||
|
||||
# Publish only the Blazor Server project
|
||||
WORKDIR "/src/IR.Blazor"
|
||||
RUN dotnet publish -c Release -o /app/publish
|
||||
|
||||
# Stage 3: Runtime container
|
||||
FROM base AS final
|
||||
WORKDIR /app
|
||||
COPY --from=build /app/publish .
|
||||
ENTRYPOINT ["dotnet", "IR.Blazor.dll"]
|
||||
@ -1,6 +1,6 @@
|
||||
namespace IR.Domain;
|
||||
|
||||
public class Class1
|
||||
public class Class2
|
||||
{
|
||||
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user