Skip to content
This repository has been archived by the owner on May 19, 2021. It is now read-only.

Working with Docker #12

Open
benmarwick opened this issue Feb 12, 2015 · 9 comments
Open

Working with Docker #12

benmarwick opened this issue Feb 12, 2015 · 9 comments

Comments

@benmarwick
Copy link

Docker is popular in the DevOps world, and the R community are especially well served by the excellent rocker project (thanks to @eddelbuettel and @cboettig) and @wch's harbor package which provides functions for controlling docker containers on local and remote hosts.

We might consider how best to combine Docker and R, especially how best to incorporate Docker into package development and package-as-research-compendium (cf #11) workflows . Some additional helper functions to work with Docker could include:

  • add_dockerfile() writes a basic dockerfile to build a docker image that includes the author's custom R package and all its dependencies, and maybe edits other files in the package if necessary (maybe .Rbuildignore)
  • add_circle() writes a circle.yml file for circleci's continuous integration service of the docker image that the dockerfile generates. Analogous to add_travis() in devtools
  • build_docker() builds the docker image from the dockerfile made by add_dockerfile(). This would require docker to be installed locally. Analogous to R package build tools in devtools and RStudio.
  • push_docker() pushes the docker image to an online repository, the Docker Hub is the big one at the moment, but Google have just announced one also. This would require docker to be installed locally. Analogous to git push in RStudio.

I previously suggested these might be part of devtools (r-lib/devtools#710), and discussion of that issue suggests that there might be more approporiate options for integrating Docker to R workflows. I'd be interested to hear more about what others think on these topic.

@cboettig
Copy link
Member

Also tagging @sckott 's analogsea R package for deploying R and RStudio quickly & easily on DigitalOcean clusters as possibly relevant here as well, as it mostly uses Docker with rocker images to quickly set up the software environment on the remote server.

@benmarwick
Copy link
Author

Yes thanks, sorry I missed that one.

@richfitz
Copy link
Member

I accidentally made something along these lines today trying to use docker to replicate a travis build error (thanks @cboettig for pointing this out to me). Proof-of-concept only, but might be useful: https://github.com/richfitz/dockertest

@benmarwick
Copy link
Author

@richfitz very neat package! Thanks for pointing it out. Have you seen dependencies which also tries to get at dependencies external to R?

@richfitz
Copy link
Member

Thanks for the pointer @benmarwick - definitely some overlap there though I think my needs are a bit different. Possibly there is some scope for discussion of dependency management in the broad sense in March (#7).

@sjackman
Copy link

I have an interest in this topic.

@thibautjombart
Copy link

This is something I am interested in too. I have generated a docker image to include a set of packages hosted on a github organisation:
https://github.com/reconhub/docker

It would be nice to automate the build upon changes of the various repos.

@gaborcsardi
Copy link

@thibautjombart Note, that this repo is for 2015. 2017 is here: https://github.com/ropensci/unconf17/issues

@thibautjombart
Copy link

Hahaha thanks.. proof I need more coffee still ;)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants