copy: Copy files into docker image

Description Usage Arguments See Also Examples

View source: R/dockerfile.R

Description

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

Command to copy files from a URL into the docker image during building the image.

Command to ADd files from local computer into the docker image during building the image.

Usage

1
2
3
4
5

Arguments

df

a dockerfile object from 'dockerfile()'

source

file to be copied from your local computer or URL to use

dir

location the file is to be copied to

file

the output file to save the URL document as

See Also

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

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

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# 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

dockerfile() %>%
 from("rocker/r-ver:devel") %>%
 update() %>%
 install("sudo","gdebi","pandoc","pandoc-citeproc",
         "libcurl4-gnutls-dev","libcairo2-dev",
         "libxtdev","wget") %>%
  run("wget --no-verbose
       https://download3.rstudio.org/ubuntu-14.04/x86_64/VERSION
       -O version.txt") %>%
  run("VERSION=$(cat version.txt)") %>%
  run("wget --no-verbose
       https://download3.rstudio.org/ubuntu-14.04/x86_64/shiny-server-$VERSION-amd64.deb
        -O ss-latest.deb") %>%
  run("gdebi -n ss-latest.deb") %>%
  run("rm -f version.txt ss-latest.deb") %>%
  run(". /etc/environment") %>%
  install_r_lib("shiny","rmarkdown") %>%
  run("cp -R /usr/local/lib/R/site-library/shiny/examples/* /srv/shiny-server/") %>%
  expose(3838) %>%
  copy("shiny-server.sh", "/usr/bin/shiny-server.sh")

# 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

dockerfile() %>%
 from("rocker/r-ver:devel") %>%
 update() %>%
 install("sudo","gdebi","pandoc","pandoc-citeproc",
         "libcurl4-gnutls-dev","libcairo2-dev",
         "libxtdev","wget","curl") %>%
  run("wget --no-verbose
      https://download3.rstudio.org/ubuntu-14.04/x86_64/VERSION
       -O version.txt") %>%
  run("VERSION=$(cat version.txt)") %>%
  run("wget --no-verbose
       https://download3.rstudio.org/ubuntu-14.04/x86_64/shiny-server-$VERSION-amd64.deb
       -O ss-latest.deb") %>%
  run("gdebi -n ss-latest.deb") %>%
  run("rm -f version.txt ss-latest.deb") %>%
  run(". /etc/environment") %>%
  install_r_lib("shiny","rmarkdown") %>%
  run("cp -R /usr/local/lib/R/site-library/shiny/examples/* /srv/shiny-server/") %>%
  expose(3838) %>%
  copy_from_url("https://raw.githubusercontent.com/rocker-org/shiny/master/shiny-server.sh",
                "/usr/bin/shiny-server.sh")

# 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

dockerfile() %>%
 from("rocker/r-ver:devel") %>%
 update() %>%
 install("sudo","gdebi","pandoc","pandoc-citeproc",
         "libcurl4-gnutls-dev","libcairo2-dev",
         "libxtdev","wget","curl") %>%
  run("wget --no-verbose
       https://download3.rstudio.org/ubuntu-14.04/x86_64/VERSION
       -O version.txt") %>%
  run("VERSION=$(cat version.txt)") %>%
  run("wget --no-verbose
       https://download3.rstudio.org/ubuntu-14.04/x86_64/shiny-server-$VERSION-amd64.deb
       -O ss-latest.deb") %>%
  run("gdebi -n ss-latest.deb") %>%
  run("rm -f version.txt ss-latest.deb") %>%
  run(". /etc/environment") %>%
  install_r_lib("shiny","rmarkdown") %>%
  run("cp -R /usr/local/lib/R/site-library/shiny/examples/* /srv/shiny-server/") %>%
  expose(3838) %>%
  copy_from_url("https://raw.githubusercontent.com/rocker-org/shiny/master/shiny-server.sh",
                "/usr/bin/shiny-server.sh") %>%
  add("/my/local/shiny/folder/","/srv/shiny-server/")

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