mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-01-22 04:25:21 +00:00
dev_cli: Fix TARGETARCH inconsistancy
In previous dev_cli.sh, the `uname -m` command will generate either `x86_64` or `aarch64`, which is inconsistent with the architectures in the Dockerfile, namely `amd64` and `arm64`. This will cause some dependancy missing in the docker container when the docker image is built locally. This commit fixes this inconsistancy. Signed-off-by: Henry Wang <Henry.Wang@arm.com>
This commit is contained in:
parent
ef1e5fd953
commit
8bf0bac5a7
@ -367,11 +367,14 @@ cmd_build-container() {
|
||||
mkdir -p $BUILD_DIR
|
||||
cp $CLH_DOCKERFILE $BUILD_DIR
|
||||
|
||||
[ $(uname -m) = "aarch64" ] && TARGETARCH="arm64"
|
||||
[ $(uname -m) = "x86_64" ] && TARGETARCH="amd64"
|
||||
|
||||
$DOCKER_RUNTIME build \
|
||||
--target $container_type \
|
||||
-t $CTR_IMAGE \
|
||||
-f $BUILD_DIR/Dockerfile \
|
||||
--build-arg TARGETARCH="$(uname -m)" \
|
||||
--build-arg TARGETARCH=$TARGETARCH \
|
||||
$BUILD_DIR
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user