Added ACCOUNT_NAME variable to container's run environment. Streamline argument handling.
This commit is contained in:
@@ -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" "$@"
|
|
||||||
|
|||||||
Reference in New Issue
Block a user