Dockerfile
819 Bytes
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
WORKDIR /src
COPY backend/RobotProductionSystem.Backend.sln ./backend/
COPY backend/src/RobotProductionSystem.Api/RobotProductionSystem.Api.csproj ./backend/src/RobotProductionSystem.Api/
RUN dotnet restore ./backend/src/RobotProductionSystem.Api/RobotProductionSystem.Api.csproj
COPY backend/. ./backend/
RUN dotnet publish ./backend/src/RobotProductionSystem.Api/RobotProductionSystem.Api.csproj \
-c Release \
-o /app/publish \
/p:UseAppHost=false
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS runtime
WORKDIR /app
RUN apt-get update \
&& apt-get install -y --no-install-recommends curl \
&& rm -rf /var/lib/apt/lists/*
ENV ASPNETCORE_URLS=http://+:8000
EXPOSE 8000
COPY --from=build /app/publish .
ENTRYPOINT ["dotnet", "RobotProductionSystem.Api.dll"]