use dict for display

This commit is contained in:
Dillon DuPont
2025-10-24 13:56:31 -07:00
parent 9cb2c6c664
commit b1eae0f2cf

View File

@@ -309,8 +309,17 @@ class DockerProvider(BaseVMProvider):
# Apply display resolution if provided (e.g., "1024x768")
display_resolution = run_opts.get("display")
if isinstance(display_resolution, str) and display_resolution:
cmd.extend(["-e", f"VNC_RESOLUTION={display_resolution}"])
if (
isinstance(display_resolution, dict)
and "width" in display_resolution
and "height" in display_resolution
):
cmd.extend(
[
"-e",
f"VNC_RESOLUTION={display_resolution['width']}x{display_resolution['height']}",
]
)
# Add the image
cmd.append(docker_image)