1
- FROM ubuntu:16.04
1
+ FROM osgeo/gdal:ubuntu-small-3.2.3
2
2
3
3
RUN apt-get -y update
4
4
RUN apt-get install -y \
5
- \
6
5
g++ \
7
- git-core \
8
6
libboost-dev \
9
7
libboost-system-dev \
10
8
libboost-filesystem-dev \
11
9
libexpat1-dev \
12
10
zlib1g-dev \
13
11
libbz2-dev \
14
12
libpq-dev \
15
- libgeos-dev \
16
13
libgeos++-dev \
17
14
libproj-dev \
18
15
libleveldb-dev \
19
16
libgeos-dev \
20
17
libprotobuf-dev \
21
- libgeos++-dev \
22
- libjson0-dev \
18
+ git-core \
23
19
curl \
24
20
wget \
25
21
unzip \
26
22
software-properties-common
27
23
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
37
30
38
31
# 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/*
47
34
48
35
# 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
54
38
55
- # Install imposm
56
- ENV GOPATH /usr/bin
57
- RUN mkdir -p go
58
39
WORKDIR /go
59
- RUN export GOPATH=`pwd`
40
+ ENV GOPATH /go
60
41
RUN go get github.com/omniscale/imposm3
61
42
RUN go install github.com/omniscale/imposm3/cmd/imposm
62
- RUN cp $ GOPATH/bin/imposm /usr/bin/imposm
43
+ ENV PATH $PATH:$ GOPATH/bin
63
44
64
45
# Install awscli and gsutil to get the pbf file
65
46
RUN pip3 install -U setuptools
66
47
RUN pip3 install awscli
67
48
RUN pip3 install gsutil
68
49
69
-
70
50
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
73
54
74
- WORKDIR /mnt/data
75
55
WORKDIR /osm
76
56
COPY config config
77
57
COPY scripts scripts
78
58
COPY start.sh start.sh
79
- CMD ./start.sh
59
+ CMD ./start.sh
0 commit comments