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.
enable the endpoint in docker_container with
and then test with
but nothing happens.