csgillespie / efficientR

Efficient R programming: a book
https://csgillespie.github.io/efficientR/
Other
721 stars 375 forks source link

Add working Dockerfile and Binder #259

Closed Robinlovelace closed 4 years ago

Robinlovelace commented 4 years ago

For reproducibility and learning.

Robinlovelace commented 4 years ago

Example of working Docker images supporting an open source book: https://github.com/geocompr/docker#geocomputation-with-r-in-docker

Example of a working Binder instance: https://mybinder.org/v2/gh/robinlovelace/geocompr/master?urlpath=rstudio

Robinlovelace commented 4 years ago

@csgillespie can you create a repo on hub.docker.com so that

docker run -it csgillespie/efficientr bash

Or similar will work on an auto-updated version?

Robinlovelace commented 4 years ago

Heads-up @csgillespie this fails:

docker pull csgillespie/efficientr
Using default tag: latest
Error response from daemon: manifest for csgillespie/efficientr:latest not found: manifest unknown: manifest unknown

Can you try manually getting the auto build to work form GH and the docker subfolders?

Robinlovelace commented 4 years ago

See here - no tagged releases: https://hub.docker.com/r/csgillespie/efficientr

Robinlovelace commented 4 years ago

Test binder here: https://mybinder.org/v2/gh/csgillespie/efficientR/master?urlpath=rstudio

Robinlovelace commented 4 years ago

Great news, the binder image works:

image

Final stage: copy the book's source code into the home directory.

csgillespie commented 4 years ago

@Robinlovelace We now have three Dockerfiles:

Do we need all three? Can we use symlinks?

Robinlovelace commented 4 years ago

We definitely need .binder so the Binder link works (try it) but don't need the docker one, happy for that folder to be deleted. Simplicity is good.