-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.gdal
76 lines (69 loc) · 2.36 KB
/
Dockerfile.gdal
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
FROM tomcat:8.5
ENV ROOTDIR /usr/local/
ENV GDAL_VERSION 1.11.5
ENV LANG pt_BR.UTF-8
ENV LANGUAGE pt_BR
ENV LC_ALL pt_BR.UTF-8
ENV LANG pt_BR.UTF-8
# Load assets
WORKDIR $ROOTDIR/
ADD http://download.osgeo.org/gdal/${GDAL_VERSION}/gdal-${GDAL_VERSION}.tar.gz $ROOTDIR/src/
# Install basic dependencies
RUN apt-get update -y && apt-get install -y \
python3-software-properties \
build-essential \
python-dev \
python3-dev \
python-numpy \
python3-numpy \
sqlite3 \
libpq-dev \
libcurl4-gnutls-dev \
libproj-dev \
libxml2-dev \
libgeos-dev \
libnetcdf-dev \
libpoppler-dev \
libspatialite-dev \
libhdf4-alt-dev \
libhdf5-serial-dev \
wget \
bash-completion \
cmake \
software-properties-common \
net-tools \
--reinstall procps \
curl \
default-jdk \
git \
maven
# Configure timezone and locale
RUN apt-get update \
&& apt-get install --reinstall -y locales \
&& sed -i 's/# pt_BR.UTF-8 UTF-8/pt_BR.UTF-8 UTF-8/' /etc/locale.gen \
&& locale-gen pt_BR.UTF-8 \
&& dpkg-reconfigure --frontend noninteractive locales
# Compile and install GDAL and GrassGis
RUN cd src && tar -xvf gdal-${GDAL_VERSION}.tar.gz && cd gdal-${GDAL_VERSION} \
&& ./configure --with-python --with-spatialite --with-pg --with-curl \
&& make && make install && ldconfig \
&& apt-get update -y \
&& apt-get remove -y --purge build-essential wget \
&& cd $ROOTDIR && cd src/gdal-${GDAL_VERSION}/swig/python \
&& python3 setup.py build \
&& python3 setup.py install \
&& cd $ROOTDIR && rm -Rf src/gdal* \
&& apt-get -y install gdal-bin \
&& apt-get -y install grass grass-dev \
&& apt-get update
ARG BUILD_DATE=unknown
ARG TRAVIS_COMMIT=unknown
LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.name="Web, GIS and image processing Docker Image" \
org.label-schema.description="SGS Docker image for Web, GIS and image processing" \
org.label-schema.url="https://hub.docker.com/r/autimio/web-gis-imageprocessing-gdal-grass" \
org.label-schema.vcs-ref=$TRAVIS_COMMIT \
org.label-schema.vcs-url="https://github.com/autimio/docker-images-gis" \
org.label-schema.vendor="Autímio Meira Brito Filho" \
org.label-schema.version=$TRAVIS_COMMIT \
org.label-schema.schema-version="1.0"