write_dockerfile: RUN command in docker image

Description Usage Arguments See Also Examples

View source: R/dockerfile.R

Description

Command to cope files in the docker image during building the image.

Usage

1
write_dockerfile(df, path, overwrite = FALSE)

Arguments

df

a dockerfile object from 'dockerfile()'

path

path to where the dockerfile will be saved at

overwrite

should the current dockefile be overwritten?

See Also

Other dockerfile: build, cmd, copy, expose, from, install_r_lib_version, install_r_lib, install, run, update

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
# Start a dockerfile based off of the rocker/shiny image to generate a
# shiny server using R version 3.6.1, update all existing software
# and install git and curl. Then initialize Rstudio server, and copy in a config file

new_dockerfile <- tempfile(pattern = "new_dockerfile_", fileext = "")


df <- dockerfile() %>%
  from("rocker/shiny:3.6.1") %>%
  update() %>%
  install("git", "libcurl4-openssl-dev") %>%
  install_r_lib("rcurl", "dplyr") %>%
  run("wget --no-check-certificate
   https://raw.githubusercontent.com/rocker-org/rstudio-daily/master/latest.R") %>%
  run("Rscript latest.R") %>%
  run("dpkg -i rstudio-server-daily-amd64.deb") %>%
  copy("userconf.sh", "/etc/cont-init.d/userconf") %>%
  write_dockerfile(new_dockerfile)

thebioengineer/dockyard documentation built on Dec. 4, 2019, 1:44 a.m.