Skip to content

Commit d1de7c4

Browse files
committed
Update imposm gdal version
1 parent 01f458c commit d1de7c4

File tree

1 file changed

+18
-38
lines changed

1 file changed

+18
-38
lines changed

images/tiler-imposm/Dockerfile

+18-38
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,59 @@
1-
FROM ubuntu:16.04
1+
FROM osgeo/gdal:ubuntu-small-3.2.3
22

33
RUN apt-get -y update
44
RUN apt-get install -y \
5-
\
65
g++ \
7-
git-core \
86
libboost-dev \
97
libboost-system-dev \
108
libboost-filesystem-dev \
119
libexpat1-dev \
1210
zlib1g-dev \
1311
libbz2-dev \
1412
libpq-dev \
15-
libgeos-dev \
1613
libgeos++-dev \
1714
libproj-dev \
1815
libleveldb-dev \
1916
libgeos-dev \
2017
libprotobuf-dev \
21-
libgeos++-dev \
22-
libjson0-dev \
18+
git-core \
2319
curl \
2420
wget \
2521
unzip \
2622
software-properties-common
2723

28-
# Install python
29-
RUN add-apt-repository ppa:deadsnakes/ppa \
30-
&& apt-get update && \
31-
apt-get update -y && \
32-
apt-get install -y build-essential python3.6 python3.6-dev python3-pip && \
33-
apt-get install -y git && \
34-
# update pip
35-
python3.6 -m pip install pip --upgrade && \
36-
python3.6 -m pip install wheel
24+
# # Install python
25+
RUN add-apt-repository ppa:deadsnakes/ppa && \
26+
apt-get update && \
27+
apt-get install -y build-essential python3.6 python3.6-dev python3-pip && \
28+
python3 -m pip install pip --upgrade && \
29+
python3 -m pip install wheel
3730

3831
# Install postgresql-client
39-
RUN apt-get update && apt-get install -y postgresql-client \
40-
&& rm -rf /var/lib/apt/lists/*
41-
42-
# Gdal is required to process the natural earth files
43-
RUN add-apt-repository ppa:ubuntugis/ppa \
44-
&& apt-get -y update \
45-
&& apt-get install -y gdal-bin \
46-
&& rm -rf /var/lib/apt/lists/*
32+
RUN apt-get update && apt-get install -y postgresql-client && \
33+
rm -rf /var/lib/apt/lists/*
4734

4835
# Install go
49-
RUN add-apt-repository ppa:gophers/archive \
50-
&& apt-get -y update \
51-
&& apt-get install -y golang-1.10-go \
52-
&& cp /usr/lib/go-1.10/bin/go /usr/bin/go \
53-
&& cp /usr/lib/go-1.10/bin/gofmt /usr/bin/gofmt
36+
RUN wget -c https://dl.google.com/go/go1.10.linux-amd64.tar.gz -O - | tar -xz -C /usr/local
37+
ENV PATH $PATH:/usr/local/go/bin
5438

55-
# Install imposm
56-
ENV GOPATH /usr/bin
57-
RUN mkdir -p go
5839
WORKDIR /go
59-
RUN export GOPATH=`pwd`
40+
ENV GOPATH /go
6041
RUN go get github.com/omniscale/imposm3
6142
RUN go install github.com/omniscale/imposm3/cmd/imposm
62-
RUN cp $GOPATH/bin/imposm /usr/bin/imposm
43+
ENV PATH $PATH:$GOPATH/bin
6344

6445
# Install awscli and gsutil to get the pbf file
6546
RUN pip3 install -U setuptools
6647
RUN pip3 install awscli
6748
RUN pip3 install gsutil
6849

69-
7050
ENV IMPOSMDATA /mnt/data
71-
RUN mkdir -p "$IMPOSMDATA" && chmod 777 "$IMPOSMDATA"
72-
VOLUME /mnt/data
51+
RUN mkdir -p $IMPOSMDATA && chmod 777 -R $IMPOSMDATA
52+
WORKDIR $IMPOSMDATA
53+
VOLUME $IMPOSMDATA
7354

74-
WORKDIR /mnt/data
7555
WORKDIR /osm
7656
COPY config config
7757
COPY scripts scripts
7858
COPY start.sh start.sh
79-
CMD ./start.sh
59+
CMD ./start.sh

0 commit comments

Comments
 (0)