From 4a985cc1f47abc18815b67a23964060ef7b19a26 Mon Sep 17 00:00:00 2001 From: Roger Far Date: Sat, 6 Feb 2021 19:44:42 -0700 Subject: [PATCH] Changed dockerfile to support armv7 --- Dockerfile | 8 ++++---- docker-publish.bat | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1d4616f..9efe7ff 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/docker-publish.bat b/docker-publish.bat index ee705e8..cea421d 100644 --- a/docker-publish.bat +++ b/docker-publish.bat @@ -1 +1 @@ -docker buildx build --push --platform linux/arm64/v8,linux/amd64 --tag rogerfar/rdtclient . \ No newline at end of file +docker buildx build --push --platform linux/arm/v7,linux/arm64/v8,linux/amd64 --tag rogerfar/rdtclient . \ No newline at end of file