Dockerfile 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. FROM ubuntu:16.04
  2. MAINTAINER Vaclav Petras <wenzeslaus@gmail.com>
  3. # system environment
  4. ENV DEBIAN_FRONTEND noninteractive
  5. # GRASS GIS compile dependencies
  6. RUN apt-get update \
  7. && apt-get install -y --install-recommends \
  8. autoconf2.13 \
  9. autotools-dev \
  10. bison \
  11. flex \
  12. g++ \
  13. gettext \
  14. libblas-dev \
  15. libbz2-dev \
  16. libcairo2-dev \
  17. libfftw3-dev \
  18. libfreetype6-dev \
  19. libgdal-dev \
  20. libgeos-dev \
  21. libglu1-mesa-dev \
  22. libjpeg-dev \
  23. liblapack-dev \
  24. liblas-c-dev \
  25. libncurses5-dev \
  26. libnetcdf-dev \
  27. libpng-dev \
  28. libpq-dev \
  29. libproj-dev \
  30. libreadline-dev \
  31. libsqlite3-dev \
  32. libtiff-dev \
  33. libxmu-dev \
  34. make \
  35. netcdf-bin \
  36. proj-bin \
  37. python \
  38. python-dev \
  39. python-numpy \
  40. python-pil \
  41. python-ply \
  42. unixodbc-dev \
  43. zlib1g-dev \
  44. && apt-get autoremove \
  45. && apt-get clean
  46. RUN mkdir /code
  47. RUN mkdir /code/grass
  48. # add repository files to the image
  49. COPY . /code/grass
  50. WORKDIR /code/grass
  51. # install GRASS GIS
  52. RUN ./configure \
  53. --enable-largefile=yes \
  54. --with-nls \
  55. --with-cxx \
  56. --with-readline \
  57. --with-bzlib \
  58. --with-pthread \
  59. --with-proj-share=/usr/share/proj \
  60. --with-geos=/usr/bin/geos-config \
  61. --with-cairo \
  62. --with-opengl-libs=/usr/include/GL \
  63. --with-freetype=yes --with-freetype-includes="/usr/include/freetype2/" \
  64. --with-sqlite=yes \
  65. --with-liblas=yes --with-liblas-config=/usr/bin/liblas-config \
  66. && make && make install && ldconfig
  67. # enable simple grass command regardless of version number
  68. RUN ln -s /usr/local/bin/grass* /usr/local/bin/grass
  69. # create a user
  70. RUN useradd -m -U grass
  71. VOLUME ["/data"]
  72. # switch the user
  73. USER grass
  74. WORKDIR /data