resources: Fix Dockerfile to support multi-architecture

In order to support both amd64 and arm64, we rely on the TARGETARCH
variable that is passed from the docker buildx command, based on the
platform used to build the container image.

There is no way to rely directly on $(uname -m) to assign a variable
with the correct x86_64 or aarch64 values we're looking for. Both ENV
and ARG don't evaluate the command, which means they see it as a simple
string. Using RUN is the only way to evaluate a command.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
Sebastien Boeuf
2020-09-28 13:49:07 +02:00
committed by Samuel Ortiz
parent 315cd5a054
commit db5d42ad41
2 changed files with 11 additions and 11 deletions

View File

@@ -6,7 +6,7 @@ on:
paths: resources/Dockerfile
jobs:
multi:
main:
runs-on: ubuntu-latest
steps:
- name: Code checkout