ropensci / RNeXML

Implementing semantically rich NeXML I/O in R
https://docs.ropensci.org/RNeXML
Other
13 stars 9 forks source link

Dockerfile instructions contain incorrect directory #111

Closed hlapp closed 9 years ago

hlapp commented 9 years ago

Here's the error I get:

Reigen:manuscripts (master) $ docker cp rnexml:/host/manuscript.pdf .
2015/01/18 12:10:18 Error response from daemon: Could not find the file /host/manuscript.pdf in container rnexml
cboettig commented 9 years ago

@hlapp thanks for testing this out. Whoops, forgot to update the paths in those comments. I'm still trying to figure out what (if anything) is the most useful way both for a user to use the Docker images and for us to document them.

Now that RNeXML is on CRAN and provided by the rocker/ropensci Docker container, I'm not sure that it's even worth providing a separate Dockerfile for RNeXML. As you can see in the Dockerfile, it doesn't install any software; it just loads the manuscript.Rmd file onto the rocker/ropensci container and sets some user permissions and defaults.

Other workflows might make more sense; for example:

docker run -v $(pwd):/host -w /host -u rstudio --rm rocker/ropensci r r -e 'rmarkdown::render("manuscript.Rmd")'

Having to link the current working directory that has the right files, manually specify the user, the container's working directory and the default command makes that line a bit more cumbersome (all these things being done by the rnexml Dockerfile as defaults). But it's also explicit and perhaps less magical.

Meanwhile, the currently documented example avoids having to share a working directory (thus avoiding any user permission issues or configuration which can be more tricky on a Mac/boot2docker client); relying on that docker cp command to get the final thing off. And the RStudio way would avoid the command line all together. So not sure which we should recommend. Thoughts?