Closed jmigueldelgado closed 5 years ago
Hi @jmigueldelgado , can you explain a little bit more about the issue? e.g. is it just knowing that there are an extra odd 100mb being included on the image which you don't need, or are you looking for how to run the geospatial image without having rstudio start up? (you can provide any other default command, e.g. docker run --rm -ti rocker/geospatial R
, to just run with an R console.
We find it is a very common concern that of users that these prebuilt images include some piece of software they don't need, particularly when that piece is visible. Note that geospatial
image also includes a python environment, a java environment, a tex stack and loads of other things that with enough dedication you could chisel out of a highly specialized image.
In the next big development push, we may be able to modularize the layer scripts a bit so it's easier to customize the stack (say, you want geospatial + cuda, but not rstudio+verse), but for now it's best not to sweat the extra megabytes. Docker's layer caching can be a big help in dealing with the minimizing image size on disk and bandwidth, so this is not often the rate-limiting issue.
Thank you so much for your reply @cboettig . This would be great:
In the next big development push, we may be able to modularize the layer scripts a bit so it's easier to customize the stack (say, you want geospatial + cuda, but not rstudio+verse)
I will give you some context. Currently I am trying to deploy a shiny app that depends on geospatial libraries, including rgdal
. I developed the app in my group and now it is time to deploy it to our "client".
I am a beginner in docker, so I start setting up a dockerfile, where everything runs smoothly: FROM ubuntu:latest
followed by FROM rocker/shiny-verse
and all is running fine. Then I try FROM rocker/geospatial
and rstudio starts complaining about a user name and all these ports that I really do not want to set up for my app, because I do not need them. I am just looking for a safe way of installing rdgal
and libgdal-dev
and some other spatial libraries in a shiny server. rocker/geospatial
solves my problem, but then requires additional configuration due to rstudio that some old-school R users like me will not know how to solve quickly.
My workaround was
RUN apt-get install -y git libgdal-dev
RUN Rscript -e "install.packages('rgdal')"
but I know that this is somewhat more vulnerable than using a packaged image like yours.
Hope this helps in shaping the future of rocker, which is very very useful for me! Thanks!
The two lines
RUN apt-get install -y git libgdal-dev
RUN Rscript -e "install.packages('rgdal')"
are good. I would also update just in case (unless the container already did) and wrap it into one:
RUN apt-get update && \
apt-get install -y git libgdal-dev && \
install.r rgdal
where install.r
is a helper we use throughout Rocker.
looks like we're all set here so closing this out
Hi. I wish there would be rocker images for eg geospatial without the need to install rstudio and rstudio-server. This would make it easier for combining shiny-verse and geospatial in light-weight shiny applications.