mirror of
https://github.com/azaion/admin.git
synced 2026-04-22 06:46:33 +00:00
Update Dockerfile for multi-platform support and enhance nginx registry script with volume and environment variable configurations
This commit is contained in:
+4
-3
@@ -2,8 +2,8 @@ FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS base
|
||||
WORKDIR /app
|
||||
EXPOSE 8080
|
||||
|
||||
# Build whole app
|
||||
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
|
||||
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:10.0 AS build
|
||||
ARG TARGETARCH
|
||||
WORKDIR /app
|
||||
|
||||
COPY . .
|
||||
@@ -13,7 +13,8 @@ WORKDIR "/app/Azaion.AdminApi"
|
||||
RUN dotnet build "Azaion.AdminApi.csproj" -c Release -o /app/build
|
||||
|
||||
FROM build AS publish
|
||||
RUN dotnet publish "Azaion.AdminApi.csproj" -c Release -o /app/publish /p:UseAppHost=false
|
||||
RUN arch=$([ "$TARGETARCH" = "amd64" ] && echo "x64" || echo "$TARGETARCH") && \
|
||||
dotnet publish "Azaion.AdminApi.csproj" -c Release -o /app/publish /p:UseAppHost=false --os linux --arch $arch
|
||||
|
||||
# Build runtime
|
||||
FROM base AS final
|
||||
|
||||
Reference in New Issue
Block a user