kirillseva / dokk

Docker-machine utilities for R

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

#dokk: Docker utilities for R

Build Status Coverage Status Release Tag

Build docker images, run docker containers locally and remotely using docker-machine.

Useful for training your models in the cloud, spinning up on-demand instances and cleaning up after you are done.

Pre-requisites:

  • docker (brew install docker)
  • docker-machine (brew cask install docker-machine, check http://caskroom.io)

Usage

(function(machine_name) {
  # 1. Create the machine
  dokk::machine_DigitalOcean(machine_name, size="512mb")
  on.exit(dokk::machine_rm(machine_name))
  # 2. Build docker image from your Dockerfile
  dokk::build_image(machine_name, ".", intern = FALSE,
    params = productivus::pp("-t #{machine_name}-image"))
  # 3. Build a container from the image and run it!
  dokk::run_image(machine_name, productivus::pp("#{machine_name}-image"),
    command = 'echo hello world')
})("testmachine")

About

Docker-machine utilities for R


Languages

Language:R 100.0%