[GRASS-SVN] r72969 - grass/trunk
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Jul 10 01:44:19 PDT 2018
Author: neteler
Date: 2018-07-10 01:44:19 -0700 (Tue, 10 Jul 2018)
New Revision: 72969
Modified:
grass/trunk/Dockerfile
Log:
Dockerfile: dependency cleanup, +PDAL, +libLAS, +PostgreSQL; compile without debug symbols to shrink docker image
Modified: grass/trunk/Dockerfile
===================================================================
--- grass/trunk/Dockerfile 2018-07-10 02:55:36 UTC (rev 72968)
+++ grass/trunk/Dockerfile 2018-07-10 08:44:19 UTC (rev 72969)
@@ -12,13 +12,7 @@
# GRASS GIS compile dependencies
RUN apt-get update \
&& apt-get install -y --no-install-recommends --no-install-suggests \
- autoconf2.13 \
- autotools-dev \
- bison \
build-essential \
- flex \
- g++ \
- gettext \
libblas-dev \
libbz2-dev \
libcairo2-dev \
@@ -30,11 +24,14 @@
libgsl0-dev \
libjpeg-dev \
liblapack-dev \
+ liblas-dev \
liblas-c-dev \
libncurses5-dev \
libnetcdf-dev \
libopenjp2-7 \
libopenjp2-7-dev \
+ libpdal-dev pdal \
+ libpdal-plugin-python \
libpng-dev \
libpq-dev \
libproj-dev \
@@ -43,6 +40,10 @@
libtiff-dev \
libxmu-dev \
libzstd-dev \
+ bison \
+ flex \
+ g++ \
+ gettext \
gdal-bin \
libfftw3-bin \
make \
@@ -63,6 +64,8 @@
&& apt-get clean && \
mkdir -p $DATA_DIR
+RUN echo LANG="en_US.UTF-8" > /etc/default/locale
+
RUN mkdir /code
RUN mkdir /code/grass
@@ -71,21 +74,34 @@
WORKDIR /code/grass
-# install GRASS GIS
+# Set gcc/g++ environmental variables for GRASS GIS compilation, without debug symbols
+ENV MYCFLAGS "-O2 -march=native -std=gnu99 -m64"
+ENV MYLDFLAGS "-s"
+# CXX stuff:
+ENV LD_LIBRARY_PATH "/usr/local/lib"
+ENV LDFLAGS "$MYLDFLAGS"
+ENV CFLAGS "$MYCFLAGS"
+ENV CXXFLAGS "$MYCXXFLAGS"
+
+# Configure, compile and install GRASS GIS
RUN ./configure \
--enable-largefile \
--with-cxx \
--with-nls \
--with-readline \
+ --with-sqlite \
--with-bzlib \
--with-zstd \
- --with-cairo \
+ --with-cairo --with-cairo-ldflags=-lfontconfig \
+ --with-freetype --with-freetype-includes="/usr/include/freetype2/" \
+ --with-fftw \
+ --with-netcdf \
--with-liblas --with-liblas-config=/usr/bin/liblas-config \
- --with-freetype --with-freetype-includes="/usr/include/freetype2/" \
- --with-proj-share=/usr/share/proj \
+ --with-pdal \
+ --with-proj --with-proj-share=/usr/share/proj \
--with-geos=/usr/bin/geos-config \
+ --with-postgres --with-postgres-includes="/usr/include/postgresql" \
--with-opengl-libs=/usr/include/GL \
- --with-sqlite \
&& make -j2 && make install && ldconfig
# enable simple grass command regardless of version number
@@ -101,11 +117,11 @@
# create a user
RUN useradd -m -U grass
-# declare volume late so permissions apply
+# declare data volume late so permissions apply
VOLUME $DATA_DIR
WORKDIR $DATA_DIR
-# Reduce the image size further
+# Further reduce the docker image size
RUN rm -rf /code/grass
# switch the user
More information about the grass-commit
mailing list