Changes
Build and Push Docker Images / build (push) Failing after 2s

This commit is contained in:
2026-05-06 19:10:06 +03:00
parent 9db4fa8de7
commit fce3e881e8
13 changed files with 553 additions and 843 deletions
+14 -7
View File
@@ -1,14 +1,20 @@
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
ARG BUILD_CONFIGURATION=Release
WORKDIR /src/api
WORKDIR /src
# Copy the project file and restore first to leverage Docker layer caching
COPY api.csproj ./
RUN dotnet restore api.csproj
COPY api/api.csproj api/
COPY api-models/api-models.csproj api-models/
COPY cv-matcher-api-models/cv-matcher-api-models.csproj cv-matcher-api-models/
COPY startup-helpers/startup-helpers.csproj startup-helpers/startup-helpers/
# Copy only the api project files to avoid bringing other projects into the build context
COPY . ./
RUN dotnet publish api.csproj -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
RUN dotnet restore api/api.csproj
COPY api/ api/
COPY api-models/ api-models/
COPY cv-matcher-api-models/ cv-matcher-api-models/
COPY startup-helpers/ startup-helpers/
RUN dotnet publish api/api.csproj -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS final
WORKDIR /app
@@ -16,4 +22,5 @@ EXPOSE 8080
ENV ASPNETCORE_URLS=http://0.0.0.0:8080
COPY --from=build /app/publish .
ENTRYPOINT ["dotnet", "api.dll"]