Browse Source

Dockerfiles moved into distro specific subdirs (#148)

- Dockerfiles moved into distro specific subdirs to avoid README clutter
- wget silenced
- change of tests to download rather than ADD
Markus Neteler 5 years ago
parent
commit
5d08b57e3a

+ 8 - 5
docker/Dockerfile_alpine

@@ -230,13 +230,16 @@ RUN pip install grass-session
 # set GRASSBIN
 ENV GRASSBIN="/usr/local/bin/grass"
 
-# =====================
+# ===========================
 # TEST grass-session and PDAL
-# =====================
-#ADD testdata/test_grass_session.py /scripts
-#ADD testdata/simple.laz /tmp
+# ===========================
+
+WORKDIR /tmp
+RUN wget -q https://raw.githubusercontent.com/OSGeo/grass/master/docker/testdata/simple.laz -O simple.laz
+WORKDIR /scripts
+RUN wget -q https://raw.githubusercontent.com/OSGeo/grass/master/docker/testdata/test_grass_session.py -O test_grass_session.py
 ## just scan the LAZ file
-#RUN /usr/bin/python3 /scripts/test_grass_session.py
+RUN /usr/bin/python3 /scripts/test_grass_session.py
 
 # ========
 # FINALIZE

docker/Dockerfile_alpine_wxgui → docker/alpine/Dockerfile_alpine_wxgui


docker/README_alpine.md → docker/alpine/README_alpine.md


+ 7 - 5
docker/Dockerfile_debian_pdal

@@ -57,6 +57,7 @@ RUN apt-get update && apt-get upgrade -y && \
     libsqlite3-dev \
     libtiff-dev \
     libzstd-dev \
+    locales \
     make \
     mesa-common-dev \
     moreutils \
@@ -79,8 +80,7 @@ RUN apt-get update && apt-get upgrade -y && \
     vim \
     wget \
     zip \
-    zlib1g-dev \
-    locales
+    zlib1g-dev
 
 RUN echo LANG="en_US.UTF-8" > /etc/default/locale
 RUN echo en_US.UTF-8 UTF-8 >> /etc/locale.gen && locale-gen
@@ -241,9 +241,11 @@ ENV GRASSBIN "/usr/local/bin/grass"
 ENV PYTHONPATH "${PYTHONPATH}:$GISBASE/etc/python/"
 ENV LD_LIBRARY_PATH "$LD_LIBRARY_PATH:$GISBASE/lib"
 
-ADD testdata/test_grass_session.py /scripts
-ADD testdata/simple.laz /tmp
-# simple test: just scan the LAZ file
+WORKDIR /tmp
+RUN wget -q https://raw.githubusercontent.com/OSGeo/grass/master/docker/testdata/simple.laz -O simple.laz
+WORKDIR /scripts
+RUN wget -q https://raw.githubusercontent.com/OSGeo/grass/master/docker/testdata/test_grass_session.py -O test_grass_session.py
+## just scan the LAZ file
 RUN /usr/bin/python3 /scripts/test_grass_session.py
 
 WORKDIR /grassdb

docker/README_debian.md → docker/debian/README_debian.md


+ 21 - 19
docker/Dockerfile_ubuntu_pdal

@@ -88,10 +88,10 @@ RUN echo en_US.UTF-8 UTF-8 >> /etc/locale.gen && locale-gen
 
 ## install the latest projection library for GRASS GIS
 WORKDIR /src
-RUN wget http://download.osgeo.org/proj/proj-${PROJ_VERSION}.tar.gz && \
-    tar xzvf proj-${PROJ_VERSION}.tar.gz && \
+RUN wget -q http://download.osgeo.org/proj/proj-${PROJ_VERSION}.tar.gz && \
+    tar xzf proj-${PROJ_VERSION}.tar.gz && \
     cd /src/proj-${PROJ_VERSION}/ && \
-    wget http://download.osgeo.org/proj/proj-datumgrid-${PROJ_DATUMGRID_VERSION}.zip && \
+    wget -q http://download.osgeo.org/proj/proj-datumgrid-${PROJ_DATUMGRID_VERSION}.zip && \
     cd nad && \
     unzip ../proj-datumgrid-${PROJ_DATUMGRID_VERSION}.zip && \
     cd .. && \
@@ -102,7 +102,7 @@ RUN wget http://download.osgeo.org/proj/proj-${PROJ_VERSION}.tar.gz && \
 ## install laz-perf
 RUN apt-get install cmake
 WORKDIR /src
-RUN wget https://github.com/hobu/laz-perf/archive/${LAZ_PERF_VERSION}.tar.gz -O laz-perf-${LAZ_PERF_VERSION}.tar.gz && \
+RUN wget -q https://github.com/hobu/laz-perf/archive/${LAZ_PERF_VERSION}.tar.gz -O laz-perf-${LAZ_PERF_VERSION}.tar.gz && \
     tar -zxf laz-perf-${LAZ_PERF_VERSION}.tar.gz && \
     cd laz-perf-${LAZ_PERF_VERSION} && \
     mkdir build && \
@@ -115,22 +115,22 @@ RUN wget https://github.com/hobu/laz-perf/archive/${LAZ_PERF_VERSION}.tar.gz -O
 WORKDIR /src
 RUN mkdir vdatum && \
     cd vdatum && \
-    wget http://download.osgeo.org/proj/vdatum/usa_geoid2012.zip && unzip -j -u usa_geoid2012.zip -d /usr/share/proj; \
-    wget http://download.osgeo.org/proj/vdatum/usa_geoid2009.zip && unzip -j -u usa_geoid2009.zip -d /usr/share/proj; \
-    wget http://download.osgeo.org/proj/vdatum/usa_geoid2003.zip && unzip -j -u usa_geoid2003.zip -d /usr/share/proj; \
-    wget http://download.osgeo.org/proj/vdatum/usa_geoid1999.zip && unzip -j -u usa_geoid1999.zip -d /usr/share/proj; \
-    wget http://download.osgeo.org/proj/vdatum/vertcon/vertconc.gtx && mv vertconc.gtx /usr/share/proj; \
-    wget http://download.osgeo.org/proj/vdatum/vertcon/vertcone.gtx && mv vertcone.gtx /usr/share/proj; \
-    wget http://download.osgeo.org/proj/vdatum/vertcon/vertconw.gtx && mv vertconw.gtx /usr/share/proj; \
-    wget http://download.osgeo.org/proj/vdatum/egm96_15/egm96_15.gtx && mv egm96_15.gtx /usr/share/proj; \
-    wget http://download.osgeo.org/proj/vdatum/egm08_25/egm08_25.gtx && mv egm08_25.gtx /usr/share/proj; \
+    wget -q http://download.osgeo.org/proj/vdatum/usa_geoid2012.zip && unzip -j -u usa_geoid2012.zip -d /usr/share/proj; \
+    wget -q http://download.osgeo.org/proj/vdatum/usa_geoid2009.zip && unzip -j -u usa_geoid2009.zip -d /usr/share/proj; \
+    wget -q http://download.osgeo.org/proj/vdatum/usa_geoid2003.zip && unzip -j -u usa_geoid2003.zip -d /usr/share/proj; \
+    wget -q http://download.osgeo.org/proj/vdatum/usa_geoid1999.zip && unzip -j -u usa_geoid1999.zip -d /usr/share/proj; \
+    wget -q http://download.osgeo.org/proj/vdatum/vertcon/vertconc.gtx && mv vertconc.gtx /usr/share/proj; \
+    wget -q http://download.osgeo.org/proj/vdatum/vertcon/vertcone.gtx && mv vertcone.gtx /usr/share/proj; \
+    wget -q http://download.osgeo.org/proj/vdatum/vertcon/vertconw.gtx && mv vertconw.gtx /usr/share/proj; \
+    wget -q http://download.osgeo.org/proj/vdatum/egm96_15/egm96_15.gtx && mv egm96_15.gtx /usr/share/proj; \
+    wget -q http://download.osgeo.org/proj/vdatum/egm08_25/egm08_25.gtx && mv egm08_25.gtx /usr/share/proj; \
     cd .. && \
     rm -rf vdatum
 
 ## install pdal
 ENV NUMTHREADS=4
 WORKDIR /src
-RUN wget \
+RUN wget -q \
  https://github.com/PDAL/PDAL/releases/download/${PDAL_VERSION}/PDAL-${PDAL_VERSION}-src.tar.gz && \
     tar xfz PDAL-${PDAL_VERSION}-src.tar.gz && \
     cd /src/PDAL-${PDAL_VERSION}-src && \
@@ -221,8 +221,8 @@ ENV GRASS_SKIP_MAPSET_OWNER_CHECK 1
 # Create generic GRASS GIS binary name regardless of version number
 RUN ln -sf `find /usr/local/bin -name "grass??" | sort | tail -n 1` /usr/local/bin/grass
 
-# TODO rename when 'code_revision' is available
-RUN grass --config svn_revision version
+# show GRASS GIS, PROJ, GDAL etc versions
+RUN grass --tmp-location EPSG:4326 --exec g.version -rge
 
 # Reduce the image size
 RUN apt-get autoremove -y
@@ -242,9 +242,11 @@ ENV GRASSBIN "/usr/local/bin/grass"
 ENV PYTHONPATH "${PYTHONPATH}:$GISBASE/etc/python/"
 ENV LD_LIBRARY_PATH "$LD_LIBRARY_PATH:$GISBASE/lib"
 
-ADD testdata/test_grass_session.py /scripts
-ADD testdata/simple.laz /tmp
-# simple test: just scan the LAZ file
+WORKDIR /tmp
+RUN wget -q https://raw.githubusercontent.com/OSGeo/grass/master/docker/testdata/simple.laz -O simple.laz
+WORKDIR /scripts
+RUN wget -q https://raw.githubusercontent.com/OSGeo/grass/master/docker/testdata/test_grass_session.py -O test_grass_session.py
+## just scan the LAZ file
 RUN /usr/bin/python3 /scripts/test_grass_session.py
 
 WORKDIR /grassdb

docker/README_ubuntu.md → docker/ubuntu/README_ubuntu.md