Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add versioned docker images based on rocker/r-ver base images #117

Closed
nihonjinrxs opened this issue Jun 20, 2017 · 7 comments
Closed

Add versioned docker images based on rocker/r-ver base images #117

nihonjinrxs opened this issue Jun 20, 2017 · 7 comments

Comments

@nihonjinrxs
Copy link

It would be great for production deployment to have a docker image for plumber based on the r-ver images from rocker-org. That way, code can be version-stable between container builds.

Seems like it should be a one-line change in the Dockerfile, and probably entails more work on the Docker Hub side than anything else.

Any chance you could provide that as an officially sanctioned option via Docker Hub?

@trestletech
Copy link
Contributor

You're saying you want the plumber Docker images pinned to the R versions? Or that you want them versioned by plumber release?

I guess I'm open to either, but I'm not sure how to go about provisioning this kind of parameterized Docker image on DockerHub. If you have pointers or want to open a PR I'd be interested.

@FvD
Copy link
Contributor

FvD commented Jun 20, 2017

What works for me is to pin the r version with r-ver from rocker and then pin the plumber version (and those of other packages) with devtools like so:

RUN R -e "install.packages('devtools')"
RUN R -e "devtools::install_version('plumber', version = '0.3.2', repos = 'https://cloud.r-project.org/')"

Maybe it makes sense to base a series of public images on separate plumber versions, but I could imagine that just documenting the process to fix the version with a reference to r-ver could be just as helpful. Plumber is likely to be only one of a list of package for most projects.

@nihonjinrxs
Copy link
Author

Yep, I'm doing something similar now, but it would be nice to have a public image (or a set of them) where that's already done. If you include plumber, jsonlite, and the hadleyverse packages, I expect that should cover most cases. Any other packages could certainly be added on top in a Dockerfile derived from one of those images.

@nihonjinrxs
Copy link
Author

@trestletech I'm thinking versions of R, but that also should mean that whatever most appropriate version of plumber is pinned as well. The rocker/r-ver images use MRAN, so I believe that means they're pulling from a set collection of packages pinned to a particular date archive of CRAN.

@nuest
Copy link

nuest commented Jun 27, 2017

You can add multiple tags based (even based on environment variables) on Docker Hub with build hooks, so you could create tags based on the R version, based on the plumber version (extracted from the description file), or both.

I've done this for other repos and would be glad to help out once you agree on a tagging scheme, though it's not that hard, see o2r-project/o2r-muncher@135330b...c7b2a07 (

@FvD
Copy link
Contributor

FvD commented Jun 29, 2017

@nuest that looks really cool! Do I understand correctly that you fix all your package versions in the package.json file? Does this automatically tag a production (dependencies) and development (devDependencies) environment?

@schloerke
Copy link
Collaborator

Fixed in #589

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

No branches or pull requests

5 participants