Update Dockerfile for multi-architecture support and enhance coding rules

- Modify Dockerfile to support multi-platform builds using TARGETARCH.
- Update coderule.mdc to enforce source code organization under the `src/` directory.
- Remove outdated rule from python.mdc regarding `src/` layout.
This commit is contained in:
Oleksandr Bezdieniezhnykh
2026-04-06 05:03:27 +03:00
parent 2528a1e995
commit 37bee961ab
3 changed files with 5 additions and 3 deletions
+4 -2
View File
@@ -1,7 +1,9 @@
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 /src
COPY . .
RUN dotnet publish -c Release -o /app
RUN arch=$([ "$TARGETARCH" = "amd64" ] && echo "x64" || echo "$TARGETARCH") && \
dotnet publish -c Release -o /app --os linux --arch $arch
FROM mcr.microsoft.com/dotnet/aspnet:10.0
WORKDIR /app