mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-10-05 21:15:45 +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
|
mkdir -p $BUILD_DIR
|
||||||
cp $CLH_DOCKERFILE $BUILD_DIR
|
cp $CLH_DOCKERFILE $BUILD_DIR
|
||||||
|
|
||||||
|
[ $(uname -m) = "aarch64" ] && TARGETARCH="arm64"
|
||||||
|
[ $(uname -m) = "x86_64" ] && TARGETARCH="amd64"
|
||||||
|
|
||||||
$DOCKER_RUNTIME build \
|
$DOCKER_RUNTIME build \
|
||||||
--target $container_type \
|
--target $container_type \
|
||||||
-t $CTR_IMAGE \
|
-t $CTR_IMAGE \
|
||||||
-f $BUILD_DIR/Dockerfile \
|
-f $BUILD_DIR/Dockerfile \
|
||||||
--build-arg TARGETARCH="$(uname -m)" \
|
--build-arg TARGETARCH=$TARGETARCH \
|
||||||
$BUILD_DIR
|
$BUILD_DIR
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user