From 29d1aa9ea9df49018d6b82b2038097a3fb2be33d Mon Sep 17 00:00:00 2001 From: "Guil. Sperb Machado" Date: Tue, 3 Oct 2023 12:35:00 +0200 Subject: [PATCH] Update Dockerfile to properly enable multi platform (#902) * use BUILDPLATFORM special env var to properly enable multi-arch on dotnet images * enable manual trigger of docker tests workflow --- .github/workflows/docker-test.yml | 4 +++- Dockerfile | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker-test.yml b/.github/workflows/docker-test.yml index e4b4a88d3..47a1fc4b0 100644 --- a/.github/workflows/docker-test.yml +++ b/.github/workflows/docker-test.yml @@ -1,6 +1,8 @@ name: Docker Build Test -on: pull_request +on: + pull_request: + workflow_dispatch: jobs: docker-build-test: diff --git a/Dockerfile b/Dockerfile index 521ccfe68..efbe0f72b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/dotnet/sdk:7.0 AS Build +FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:7.0 AS Build COPY neo-cli /neo-cli COPY Neo.ConsoleService /Neo.ConsoleService @@ -7,7 +7,7 @@ COPY NuGet.Config /neo-cli WORKDIR /neo-cli RUN dotnet restore && dotnet publish -c Release -o /app -FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS Final +FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/aspnet:7.0 AS Final RUN apt-get update && apt-get install -y \ screen \ libleveldb-dev \