Browse Source

Tweaks to docker functions

master
boB Rudis 7 years ago
parent
commit
a9d3880dac
  1. 12
      R/docker.r
  2. 7
      man/install_splash.Rd
  3. 5
      man/start_splash.Rd
  4. 6
      man/stop_splash.Rd

12
R/docker.r

@ -1,5 +1,7 @@
#' Retrieve the Docker image for Splash
#'
#' @md
#' @param host Docker host; defauolts to `localhost`
#' @return `harbor` `host` object
#' @export
#' @examples \dontrun{
@ -7,12 +9,13 @@
#' splash_container <- start_splash()
#' stop_splash(splash_container)
#' }
install_splash <- function() {
harbor::docker_pull(localhost, "scrapinghub/splash")
install_splash <- function(host = harbor::localhost) {
harbor::docker_pull(host, "scrapinghub/splash")
}
#' Start a Splash server Docker container
#'
#' @param host Docker host; defauolts to `localhost`
#' @note you need Docker running on your system and have pulled the container with
#' [install_spash] for this to work. You should save the resultant `host`
#' object for use in [stop_splash].
@ -23,13 +26,14 @@ install_splash <- function() {
#' splash_container <- start_splash()
#' stop_splash(splash_container)
#' }
start_splash <- function() {
harbor::docker_run(localhost, image = "scrapinghub/splash", detach = TRUE,
start_splash <- function(host = harbor::localhost) {
harbor::docker_run(host, image = "scrapinghub/splash", detach = TRUE,
docker_opts = "-p 5023:5023 -p 8050:8050 -p 8051:8051")
}
#' Stop a running a Splash server Docker container
#'
#' @param splash_container saved Splash container id from [start_splash]
#' @param splash_container Docker `container` object created by [start_splash]
#' @note you need Docker running on your system and have pulled the container with
#' [install_spash] and started the Splash container with [start_splash] for this

7
man/install_splash.Rd

@ -4,10 +4,13 @@
\alias{install_splash}
\title{Retrieve the Docker image for Splash}
\usage{
install_splash()
install_splash(host = harbor::localhost)
}
\arguments{
\item{host}{Docker host; defauolts to \code{localhost}}
}
\value{
`harbor` `host` object
\code{harbor} \code{host} object
}
\description{
Retrieve the Docker image for Splash

5
man/start_splash.Rd

@ -4,7 +4,10 @@
\alias{start_splash}
\title{Start a Splash server Docker container}
\usage{
start_splash()
start_splash(host = harbor::localhost)
}
\arguments{
\item{host}{Docker host; defauolts to `localhost`}
}
\value{
`harbor` `container` object

6
man/stop_splash.Rd

@ -4,9 +4,13 @@
\alias{stop_splash}
\title{Stop a running a Splash server Docker container}
\usage{
stop_splash(splash_container)
stop_splash(splash_container, host = harbor::localhost)
}
\arguments{
\item{splash_container}{saved Splash container id from [start_splash]}
\item{host}{Docker host; defauolts to `localhost`}
\item{splash_container}{Docker `container` object created by [start_splash]}
}
\description{

Loading…
Cancel
Save