Add TDX dockerfile & CI for asterinas

This commit is contained in:
Hsy-Intel
2024-05-08 15:58:56 +08:00
committed by Tate, Hongliang Tian
parent a997785166
commit 8c39309381
10 changed files with 339 additions and 107 deletions

View File

@ -8,6 +8,11 @@ SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
ASTER_SRC_DIR=${SCRIPT_DIR}/../..
CARGO_TOML_PATH=${SCRIPT_DIR}/../../Cargo.toml
VERSION=$( cat ${ASTER_SRC_DIR}/VERSION )
IMAGE_NAME=asterinas/asterinas:${VERSION}
if [ "$1" = "intel-tdx" ]; then
IMAGE_NAME="asterinas/asterinas:${VERSION}-tdx"
else
IMAGE_NAME="asterinas/asterinas:${VERSION}"
fi
docker run -it --privileged --network=host --device=/dev/kvm -v ${ASTER_SRC_DIR}:/root/asterinas ${IMAGE_NAME}