Added ACCOUNT_NAME variable to container's run environment. Streamline argument handling.

This commit is contained in:
2025-12-16 08:37:51 +01:00
parent 374b4e48bf
commit 65bbb79396

View File

@@ -107,11 +107,10 @@ fi
EXTRA_ARGS+=( EXTRA_ARGS+=(
"--mount" "type=volume,source=$VOLUME_NAME,target=/home/${USER_NAME}" "--mount" "type=volume,source=$VOLUME_NAME,target=/home/${USER_NAME}"
"--mount" "type=bind,source=$(pwd),target=/workdir" "--mount" "type=bind,source=$(pwd),target=/workdir"
"--env" "ACCOUNT_NAME=$ACCOUNT_NAME"
"--name" "azure-cli-$VOLUME_NAME"
"--workdir" "/workdir"
) )
# Run the container # Run the container
$CMD run --rm -it \ $CMD run --rm -it ${EXTRA_ARGS[@]} $IMAGE_NAME --user "$USER_NAME" "$@"
${EXTRA_ARGS[@]} \
--name "azure-cli-$VOLUME_NAME" \
--workdir /workdir \
$IMAGE_NAME --user "$USER_NAME" "$@"