[GRASS-SVN] r71374 - grass/branches/releasebranch_7_2

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Aug 10 09:07:53 PDT 2017


Author: neteler
Date: 2017-08-10 09:07:52 -0700 (Thu, 10 Aug 2017)
New Revision: 71374

Added:
   grass/branches/releasebranch_7_2/Dockerfile
Modified:
   grass/branches/releasebranch_7_2/README
Log:
Dockerfile for the local source code with doc in README (trunk, r71318)

Copied: grass/branches/releasebranch_7_2/Dockerfile (from rev 71318, grass/trunk/Dockerfile)
===================================================================
--- grass/branches/releasebranch_7_2/Dockerfile	                        (rev 0)
+++ grass/branches/releasebranch_7_2/Dockerfile	2017-08-10 16:07:52 UTC (rev 71374)
@@ -0,0 +1,86 @@
+FROM ubuntu:16.04
+
+MAINTAINER Vaclav Petras <wenzeslaus at gmail.com>
+
+# system environment
+ENV DEBIAN_FRONTEND noninteractive
+
+# GRASS GIS compile dependencies
+RUN apt-get update \
+    && apt-get install -y --install-recommends \
+        autoconf2.13 \
+        autotools-dev \
+        bison \
+        flex \
+        g++ \
+        gettext \
+        libblas-dev \
+        libbz2-dev \
+        libcairo2-dev \
+        libfftw3-dev \
+        libfreetype6-dev \
+        libgdal-dev \
+        libgeos-dev \
+        libglu1-mesa-dev \
+        libjpeg-dev \
+        liblapack-dev \
+        liblas-c-dev \
+        libncurses5-dev \
+        libnetcdf-dev \
+        libpng-dev \
+        libpq-dev \
+        libproj-dev \
+        libreadline-dev \
+        libsqlite3-dev \
+        libtiff-dev \
+        libxmu-dev \
+        make \
+        netcdf-bin \
+        proj-bin \
+        python \
+        python-dev \
+        python-numpy \
+        python-pil \
+        python-ply \
+        unixodbc-dev \
+        zlib1g-dev \
+    && apt-get autoremove \
+    && apt-get clean
+
+RUN mkdir /code
+RUN mkdir /code/grass
+
+# add repository files to the image
+COPY . /code/grass
+
+WORKDIR /code/grass
+
+# install GRASS GIS
+RUN ./configure \
+    --enable-largefile=yes \
+    --with-nls \
+    --with-cxx \
+    --with-readline \
+    --with-bzlib \
+    --with-pthread \
+    --with-proj-share=/usr/share/proj \
+    --with-geos=/usr/bin/geos-config \
+    --with-cairo \
+    --with-opengl-libs=/usr/include/GL \
+    --with-freetype=yes --with-freetype-includes="/usr/include/freetype2/" \
+    --with-sqlite=yes \
+    --with-liblas=yes --with-liblas-config=/usr/bin/liblas-config \
+    && make && make install && ldconfig
+
+# enable simple grass command regardless of version number
+RUN ln -s /usr/local/bin/grass* /usr/local/bin/grass
+
+# create a user
+RUN useradd -m -U grass
+
+VOLUME ["/data"]
+
+# switch the user
+USER grass
+
+WORKDIR /data

Modified: grass/branches/releasebranch_7_2/README
===================================================================
--- grass/branches/releasebranch_7_2/README	2017-08-10 15:48:29 UTC (rev 71373)
+++ grass/branches/releasebranch_7_2/README	2017-08-10 16:07:52 UTC (rev 71374)
@@ -50,3 +50,24 @@
 An online version is available at:
 http://grass.osgeo.org/programming7/
 
+## Docker
+
+Build using the downloaded source code (in the directory with the
+source code):
+
+    docker build -t grass .
+
+A test run (assuming you have existing GRASS GIS location)
+
+    docker run --rm -v /your/local/grassdata/:/data -it grass \
+        grass /data/nc_basic_spm/PERMANENT --exec g.region -p
+
+Note that the first `grass` is a name of the image while the second
+`grass` is the name of the executable.
+
+To run the tests (again assuming local location):
+
+    docker run --rm -v /your/test/grassdata/:/data -w /code/grass \
+        -it grass grass /data/nc_basic_spm/PERMANENT --exec \
+            python -m grass.gunittest.main \
+                --location nc_basic_spm --location-type nc



More information about the grass-commit mailing list