minimal Docker image recommendations?
Since docker is used frequently for web app/shiny cloud deployments, it would be nice to have a minimal recommended docker image that satisfies the mapgl / shiny dependencies like sf, etc.
The existing R containers for Geospatial libs I see in the R community are very large (3-5GB's) which complicate cloud deployments.
I see examples here for sf and shiny that may provide a starting point.
Am curious if any other user has bundled mapgl/shiny into a docker container, if not I'll give it a try.
This one has been working for me, but I'm by no means an expert in this so I'm sure it could be better. 374 MB, about 6 min to build.
FROM rhub/r-minimal
RUN installr -d \
-t "openssl-dev linux-headers gfortran proj-dev gdal-dev sqlite-dev geos-dev udunits-dev zlib-dev" \
-a "libssl3 proj gdal gdal-tools geos expat udunits" \
shiny mapgl
EXPOSE 3838
The first two examples in the Shiny vignette work if you change shinyApp(ui, server) to something like shinyApp(ui, server, options = list(port = 3838, launch.browser = F, host = "0.0.0.0"))
The third example doesn't work as the colourpicker package isn't in the container and there are no C++ compilers to build it.