mirror of
https://github.com/trycua/computer.git
synced 2026-01-01 19:10:30 -06:00
use dict for display
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user