#' Check that docker is running
#'
#' @return 0
#' @export
#'
#' @examples
#' \dontrun{sp_show_all_docker_containers()}
sp_show_all_docker_containers <- function() {
response <- system2("docker", "ps -a ",
stdout = TRUE, stderr = FALSE)
response_length <- length(response)
if (response_length == 1) {
stop("There are no Docker containers running")
}
cat(response, sep = "\n")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.