[GRASS-user] Minimal docker file to create an image for an R script which calls GRASS functions

Hi Everyone,

I am interested in deploying an R shiny app in the form of a docker image.

The Shiny App uses GRASS functions and I am wondering how shall I package GRASS and R together in a docker file to create an image. Just a simple example to make it work is what I want.

If you are aware of how I can optimize the integration with GRASS. like having GRASS and R script in separate containers although still being able to call GRASS functions from the R container, that would be great.

Any help is appreciated.

Kind regards,

···

Mehrdad

Mehrdad Varedi, M.A.Sc.

Waterlix Inc. Founder

www.waterlix.com

Hi Mehrdad,

On Sun, May 10, 2020 at 9:25 AM Mehrdad Varedi <varedi@waterlix.com> wrote:

Hi Everyone,

I am interested in deploying an R shiny app in the form of a docker image.

The Shiny App uses GRASS functions and I am wondering how shall I package GRASS and R together in a docker file to create an image. Just a simple example to make it work is what I want.

If you are aware of how I can optimize the integration with GRASS. like having GRASS and R script in separate containers although still being able to call GRASS functions from the R container, that would be great.

The smallest GRASS GIS (7.8) docker file I am aware of is our
multi-stage image which is Alpine based.
It is of 320 MB, Python 3 based and PDAL included:

https://hub.docker.com/r/mundialis/grass-py3-pdal

(yes, the README is still to be updated).

docker pull mundialis/grass-py3-pdal

Maybe you could start with that?

Best,
Markus

--
Markus Neteler, PhD
https://www.mundialis.de - free data with free software
https://grass.osgeo.org
https://courses.neteler.org/blog

Thanks Markus, I’ll check it out.
Mehrdad

On Sun, May 10, 2020 at 8:07 AM Markus Neteler <neteler@osgeo.org> wrote:

Hi Mehrdad,

On Sun, May 10, 2020 at 9:25 AM Mehrdad Varedi <varedi@waterlix.com> wrote:

Hi Everyone,

I am interested in deploying an R shiny app in the form of a docker image.

The Shiny App uses GRASS functions and I am wondering how shall I package GRASS and R together in a docker file to create an image. Just a simple example to make it work is what I want.

If you are aware of how I can optimize the integration with GRASS. like having GRASS and R script in separate containers although still being able to call GRASS functions from the R container, that would be great.

The smallest GRASS GIS (7.8) docker file I am aware of is our
multi-stage image which is Alpine based.
It is of 320 MB, Python 3 based and PDAL included:

https://hub.docker.com/r/mundialis/grass-py3-pdal

(yes, the README is still to be updated).

docker pull mundialis/grass-py3-pdal

Maybe you could start with that?

Best,
Markus


Markus Neteler, PhD
https://www.mundialis.de - free data with free software
https://grass.osgeo.org
https://courses.neteler.org/blog