You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
544 B
25 lines
544 B
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
|
|
WORKDIR /src
|
|
COPY API_SQLuedo/API/API.csproj .
|
|
|
|
# Restore dependencies
|
|
RUN dotnet restore API.csproj
|
|
|
|
# Copy the rest of the files
|
|
COPY API_SQLuedo/API/ .
|
|
|
|
# Build the application
|
|
RUN dotnet build API.csproj -c Release -o /app/build
|
|
|
|
# Publish the application
|
|
FROM build AS publish
|
|
RUN dotnet publish API.csproj -c Release -o /app/publish
|
|
|
|
|
|
# Final image
|
|
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
|
|
WORKDIR /api
|
|
EXPOSE 5000
|
|
COPY --from=publish /app/publish .
|
|
ENTRYPOINT ["dotnet", "API.dll"]
|