Update Dockerfile: add proxy env vars and copy NuGet.config
This commit is contained in:
14
Dockerfile
14
Dockerfile
@@ -1,13 +1,19 @@
|
||||
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
|
||||
|
||||
ARG HTTP_PROXY
|
||||
ARG HTTPS_PROXY
|
||||
|
||||
ENV HTTP_PROXY=${HTTP_PROXY}
|
||||
ENV HTTPS_PROXY=${HTTPS_PROXY}
|
||||
ENV http_proxy=${HTTP_PROXY}
|
||||
ENV https_proxy=${HTTPS_PROXY}
|
||||
|
||||
WORKDIR /src
|
||||
|
||||
# Copy all source files
|
||||
COPY src/ ./
|
||||
COPY NuGet.config ./
|
||||
|
||||
# Restore dependencies
|
||||
RUN dotnet restore "FrontOffice.BFF.WebApi/FrontOffice.BFF.WebApi.csproj"
|
||||
|
||||
# Build and publish
|
||||
RUN dotnet publish "FrontOffice.BFF.WebApi/FrontOffice.BFF.WebApi.csproj" -c Release -o /app/publish --no-restore
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS runtime
|
||||
|
||||
Reference in New Issue
Block a user