Open richfitz opened 6 years ago
enable the endpoint in docker_container with
self$resize <- docker_client_method( "container_resize", self, fix = fix_id)
and then test with
test_that("resize", { d <- test_docker_client() nm <- rand_str(10, "stevedore_") x <- d$container$create("nginx", tty = TRUE, stdin = TRUE) on.exit({ x$remove(force = TRUE) }) x$start() i1 <- x$inspect() x$exec(c("tput", "-T", "xterm", "cols"), stream = FALSE)$output x$resize(h = 20, w = 40) # junk return value! i2 <- x$inspect() x$exec(c("tput", "-T", "xterm", "cols"), stream = FALSE)$output x$restart(t = 0) i3 <- x$inspect() x$exec(c("tput", "-T", "xterm", "cols"), stream = FALSE)$output })
but nothing happens.
Worth noting that this is not in the cli
If I run:
docker run -it --rm ubuntu bash -c 'sleep 0.1; stty size'
Then I see 24 80
24 80
but this is coming from the parent terminal - I don't get that via the api
enable the endpoint in docker_container with
and then test with
but nothing happens.