expose: EXPOSE a port from the docker image

Description Usage Arguments See Also Examples

View source: R/dockerfile.R

Description

Command to expose a port from inside the docker container through

Usage

1
expose(df, port, type = NULL)

Arguments

df

a dockerfile object from 'dockerfile()'

port

the port to be exposing from the docker container

type

port open type (defaults to null)

See Also

Other dockerfile: build, cmd, copy, 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
# 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)

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