Git Product home page Git Product logo

dockerflow's Introduction

dockerflow

Lifecycle: experimental CRAN status

The goal of dockerflow is to quickly generate containers for deployment.

Installation

You can install the released version of dockerflow from CRAN with:

install.packages("dockerflow")

Example

This is a basic example which shows you how to solve a common problem:

Base Images

Building the JSON File

library(dockerflow)
json_data <- 
  build_me_docker(name = 'DockerPlumber',
                  version = 'rocker/shiny:4.0.1',
                  packages = c('shiny'),
                  localpath_vector = 'app.R')
json_data
#> $json_path
#> .dockerflow.DockerPlumber.json
#> 
#> $container
#> [
#>     {
#>         "base": [
#>             "rocker/shiny:4.0.1"
#>         ],
#>         "name": [
#>             "DockerPlumber"
#>         ],
#>         "workdir": [
#>             "/"
#>         ]
#>     },
#>     {
#>         "apt_get": [
#>             "sudo",
#>             "gdebi-core",
#>             "pandoc",
#>             "pandoc-citeproc",
#>             "libcurl4-gnutls-dev",
#>             "libcairo2-dev",
#>             "libxt-dev",
#>             "xtail",
#>             "wget",
#>             "libssl-dev",
#>             "libxml2-dev",
#>             "python3-venv",
#>             "libpq-dev",
#>             "libsodium-dev",
#>             "libudunits2-dev",
#>             "libgdal-dev",
#>             "systemctl",
#>             "git",
#>             "libssh2-1",
#>             "libssh2-1-dev",
#>             "unzip",
#>             "curl"
#>         ]
#>     },
#>     {
#>         "packages": [
#>             "shiny"
#>         ],
#>         "renv": {
#> 
#>         }
#>     },
#>     [
#>         "app.R"
#>     ]
#> ]
#> 

Reading the JSON File

build_container(dockerflow_path = json_data$json_path, build = TRUE)
#> # DockerPlumber
#> FROM rocker/shiny:4.0.1
#> WORKDIR /
#> RUN apt-get update --allow-releaseinfo-change -qq && apt-get install -y  \
#>  sudo \
#>  gdebi-core \
#>  pandoc \
#>  pandoc-citeproc \
#>  libcurl4-gnutls-dev \
#>  libcairo2-dev \
#>  libxt-dev \
#>  xtail \
#>  wget \
#>  libssl-dev \
#>  libxml2-dev \
#>  python3-venv \
#>  libpq-dev \
#>  libsodium-dev \
#>  libudunits2-dev \
#>  libgdal-dev \
#>  systemctl \
#>  git \
#>  libssh2-1 \
#>  libssh2-1-dev \
#>  unzip \
#>  curl
#> RUN R -e "install.packages('shiny', dependencies = TRUE)"
#> COPY ./app.R ./app.R
#> please run tail -f .dockerfiles.txt to follow the installation
#> docker build -t dockerplumber --file ./DockerPlumber . >> .dockerfiles.txt

dockerflow's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.