|
@@ -12,13 +12,7 @@ ENV DATA_DIR /data
|
|
|
# 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 @@ RUN apt-get update \
|
|
|
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 @@ RUN apt-get update \
|
|
|
libtiff-dev \
|
|
|
libxmu-dev \
|
|
|
libzstd-dev \
|
|
|
+ bison \
|
|
|
+ flex \
|
|
|
+ g++ \
|
|
|
+ gettext \
|
|
|
gdal-bin \
|
|
|
libfftw3-bin \
|
|
|
make \
|
|
@@ -63,6 +64,8 @@ RUN apt-get update \
|
|
|
&& 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 @@ COPY . /code/grass
|
|
|
|
|
|
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-liblas --with-liblas-config=/usr/bin/liblas-config \
|
|
|
+ --with-cairo --with-cairo-ldflags=-lfontconfig \
|
|
|
--with-freetype --with-freetype-includes="/usr/include/freetype2/" \
|
|
|
- --with-proj-share=/usr/share/proj \
|
|
|
+ --with-fftw \
|
|
|
+ --with-netcdf \
|
|
|
+ --with-liblas --with-liblas-config=/usr/bin/liblas-config \
|
|
|
+ --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 @@ RUN chmod -R a+rwx $DATA_DIR
|
|
|
# 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
|