Skip to content
Commits on Source (21)
FROM ubuntu:16.04
MAINTAINER Vaclav Petras <wenzeslaus@gmail.com>
FROM ubuntu:18.04
LABEL authors="Vaclav Petras,Markus Neteler"
LABEL maintainer="wenzeslaus@gmail.com,neteler@osgeo.org"
# system environment
ENV DEBIAN_FRONTEND noninteractive
......@@ -10,13 +11,8 @@ ENV DATA_DIR /data
# GRASS GIS compile dependencies
RUN apt-get update \
&& apt-get install -y --install-recommends \
autoconf2.13 \
autotools-dev \
bison \
flex \
g++ \
gettext \
&& apt-get install -y --no-install-recommends --no-install-suggests \
build-essential \
libblas-dev \
libbz2-dev \
libcairo2-dev \
......@@ -25,11 +21,15 @@ RUN apt-get update \
libgdal-dev \
libgeos-dev \
libglu1-mesa-dev \
libgsl0-dev \
libjpeg-dev \
liblapack-dev \
liblas-dev \
liblas-c-dev \
libncurses5-dev \
libnetcdf-dev \
libopenjp2-7 \
libopenjp2-7-dev \
libpng-dev \
libpq-dev \
libproj-dev \
......@@ -37,20 +37,34 @@ RUN apt-get update \
libsqlite3-dev \
libtiff-dev \
libxmu-dev \
bison \
flex \
g++ \
gettext \
gdal-bin \
libfftw3-bin \
make \
ncurses-bin \
netcdf-bin \
proj-bin \
proj-data \
python \
python-dev \
python-numpy \
python-pil \
python-ply \
sqlite3 \
subversion \
unixodbc-dev \
zlib1g-dev \
&& apt-get autoremove \
&& apt-get clean && \
mkdir -p $DATA_DIR
RUN echo LANG="en_US.UTF-8" > /etc/default/locale
ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8
RUN mkdir /code
RUN mkdir /code/grass
......@@ -59,36 +73,58 @@ 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
ENV NUMTHREADS=2
RUN ./configure \
--enable-largefile=yes \
--with-nls \
--enable-largefile \
--with-cxx \
--with-nls \
--with-readline \
--with-sqlite \
--with-bzlib \
--with-pthread \
--with-proj-share=/usr/share/proj \
--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-proj --with-proj-share=/usr/share/proj \
--with-geos=/usr/bin/geos-config \
--with-cairo \
--with-postgres --with-postgres-includes="/usr/include/postgresql" \
--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 -j2 && make install && ldconfig
&& make -j $NUMTHREADS && make install && ldconfig
# enable simple grass command regardless of version number
RUN ln -s /usr/local/bin/grass* /usr/local/bin/grass
# Reduce the image size
RUN apt-get autoremove -y
RUN apt-get clean -y
# set SHELL var to avoid /bin/sh fallback in interactive GRASS GIS sessions in docker
ENV SHELL /bin/bash
# Fix permissions
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
# Further reduce the docker image size
RUN rm -rf /code/grass
# switch the user
USER grass
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -36,6 +36,7 @@ Build-Depends: autoconf2.13,
libtiff-dev,
libwxgtk3.0-dev,
libxmu-dev,
lsb-release,
netcdf-bin,
# install optipng if compressing the PNG images in the programmers' manual
# optipng,
......@@ -49,7 +50,7 @@ Build-Depends: autoconf2.13,
python-wxgtk3.0,
unixodbc-dev,
zlib1g-dev
Standards-Version: 4.1.4
Standards-Version: 4.2.1
Vcs-Browser: https://salsa.debian.org/debian-gis-team/grass
Vcs-Git: https://salsa.debian.org/debian-gis-team/grass.git -b experimental
Homepage: http://grass.osgeo.org/
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.