Changed dockerfile to support armv7

This commit is contained in:
Roger Far 2021-02-06 19:44:42 -07:00
parent 64c2204af5
commit 4a985cc1f4
2 changed files with 5 additions and 5 deletions

View file

@ -9,15 +9,15 @@ RUN npm ci
RUN npx ng build --prod --output-path=out
# Stage 2 - Build the backend
FROM mcr.microsoft.com/dotnet/sdk:5.0.102-1-buster-slim AS dotnet-build-env
FROM mcr.microsoft.com/dotnet/sdk:5.0.102-1-buster-slim-amd64 AS dotnet-build-env
RUN mkdir /appserver
WORKDIR /appserver
COPY server/. .
RUN dotnet restore RdtClient.sln
RUN dotnet build -c Release
RUN dotnet publish -c Release -o out
RUN if [ "$BUILDPLATFORM" = "arm/v7" ] ; then dotnet restore -r linux-arm RdtClient.sln ; else dotnet restore RdtClient.sln ; fi
RUN if [ "$BUILDPLATFORM" = "arm/v7" ] ; then dotnet publish -r linux-arm -c Release -o out ; else dotnet publish -c Release -o out ; fi
# Stage 3 - Build runtime image
FROM mcr.microsoft.com/dotnet/aspnet:5.0.2-buster-slim AS base

View file

@ -1 +1 @@
docker buildx build --push --platform linux/arm64/v8,linux/amd64 --tag rogerfar/rdtclient .
docker buildx build --push --platform linux/arm/v7,linux/arm64/v8,linux/amd64 --tag rogerfar/rdtclient .