content: # VibeCodeMentor API Dockerfile
  # Multi-stage build for optimized production image
  
  # Build stage
  FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
  WORKDIR /src
  
  # Copy csproj and restore dependencies (better caching)
  COPY api/api.csproj ./api/
  WORKDIR /src/api
  RUN dotnet restore
  
  # Copy source code and build
  WORKDIR /src
  COPY api/ ./api/
  WORKDIR /src/api
  RUN dotnet publish -c Release -o /app/publish
  
  # Runtime stage
  FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS runtime
  WORKDIR /app
  
  # Install curl for health checks
  RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*
  
  # Copy published app
  COPY --from=build /app/publish .
  
  # Create non-root user for security
  RUN addgroup --system --gid 1001 appgroup && \
      adduser --system --uid 1001 --ingroup appgroup appuser && \
      chown -R appuser:appgroup /app
  USER appuser
  
  # Configure environment
  ENV ASPNETCORE_ENVIRONMENT=Production
  ENV ASPNETCORE_URLS=http://+:8080
  EXPOSE 8080
  
  # Health check endpoint
  HEALTHCHECK --interval=30s --timeout=10s --start-period=30s --retries=3 \
      CMD curl -f http://localhost:8080/health || exit 1
  
  # Start the application
  ENTRYPOINT ["dotnet", "api.dll"] 