mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-10-14 17:54:42 +00:00
19 lines
760 B
Docker
19 lines
760 B
Docker
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
|
|
ARG BUILD_CONFIGURATION=Release
|
|
WORKDIR /src
|
|
# Copy everything from the context (src/Core)
|
|
COPY . .
|
|
RUN dotnet restore "./Database/Database.Seed/Database.Seed.csproj"
|
|
RUN dotnet build "./Database/Database.Seed/Database.Seed.csproj" -c $BUILD_CONFIGURATION -o /app/build
|
|
|
|
FROM build AS publish
|
|
ARG BUILD_CONFIGURATION=Release
|
|
RUN dotnet publish "./Database/Database.Seed/Database.Seed.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
|
|
|
|
FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS final
|
|
RUN apt-get update && apt-get install -y --no-install-recommends libfontconfig1 \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
WORKDIR /app
|
|
COPY --from=publish /app/publish .
|
|
ENTRYPOINT ["dotnet", "Database.Seed.dll"]
|