This repository has been archived by the owner on Apr 30, 2024. It is now read-only.
forked from klokantech/gdal-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
102 lines (89 loc) · 2.85 KB
/
Dockerfile
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
##
# homme/gdal
#
# This creates an Ubuntu derived base image that installs the latest GDAL
# subversion checkout compiled with a broad range of drivers. The build
# process closely follows that defined in
# <https://github.com/OSGeo/gdal/blob/trunk/.travis.yml> but omits Java
# support.
#
# Ubuntu 14.04 Trusty Tahr
# https://docs.docker.com/engine/reference/builder/#from
FROM ubuntu:trusty
# Inspired by
#MAINTAINER Homme Zwaagstra <hrz@geodata.soton.ac.uk>
# MAINTAINER Klokantech <https://www.klokantech.com>
# https://docs.docker.com/engine/reference/builder/#label
# To view an image’s labels, use the `docker inspect` command.
LABEL maintainer="roblabs <http://RobLabs.com>"
LABEL version="2.1.3"
LABEL description="minimal gdal with pdf"
LABEL usage="docker run -it --rm -v $(pwd):/data roblabs/gdal /bin/bash"
# Ensure the package repository is up to date
# https://docs.docker.com/engine/reference/builder/#run
RUN apt-get update -y
# Temporarily hack around a docker build issue. See
# <https://github.com/docker/docker/issues/6345#issuecomment-49245365>.
RUN ln -s -f /bin/true /usr/bin/chfn
# Install basic dependencies
# Don't rely on `apt-get` to install node & npm
RUN apt-get install -y \
software-properties-common \
python-software-properties \
build-essential \
wget \
git libsqlite3-dev zlib1g-dev \
curl \
nodejs npm \
python-pip \
subversion \
&& curl -sL https://deb.nodesource.com/setup_8.x | sudo bash - && apt-get install -yq nodejs \
&& npm -g install json geojson-merge
# Install gdal dependencies provided by Ubuntu repositories
RUN apt-get install -y \
python-numpy \
libpq-dev \
libpng12-dev \
libjpeg-dev \
libgif-dev \
libgeos-dev \
libcurl4-gnutls-dev \
libproj-dev \
libxml2-dev \
libexpat-dev \
libxerces-c-dev \
libnetcdf-dev \
netcdf-bin \
libpoppler-dev \
gpsbabel \
swig \
libhdf4-alt-dev \
libhdf5-serial-dev \
poppler-utils \
libfreexl-dev \
unixodbc-dev \
libwebp-dev \
libepsilon-dev \
liblcms2-2 \
libpcre3-dev \
python-dev \
sudo
# Install the GDAL source dependencies
# https://docs.docker.com/engine/reference/builder/#add
ADD ./install-gdal-deps.sh /tmp/
RUN sh /tmp/install-gdal-deps.sh
# Install GDAL itself
ADD ./gdal-checkout.txt /tmp/gdal-checkout.txt
ADD ./install-gdal.sh /tmp/
RUN sh /tmp/install-gdal.sh
# Externally accessible data is by default put in /data
# https://docs.docker.com/engine/reference/builder/#volume
# https://docs.docker.com/engine/reference/builder/#workdir
WORKDIR /data
VOLUME ["/data"]
# Add to PATH item installed via `pip install`
# https://docs.docker.com/engine/reference/builder/#environment-replacement
ENV PATH="~/.local/bin:${PATH}"
# Clean up APT when done.
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
CMD gdalinfo --version