Docker с imposm3 и скриптом загрузки
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

44 lines
1.8 KiB

FROM debian:sid AS build
MAINTAINER Vitaliy Filippov <vitalif@mail.ru>
# Используем одинаковое начало для ускорения сборки
ADD [ "etc/apt/apt.conf", "/etc/apt/" ]
ADD etc/locale.gen /etc/locale.gen
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y -q \
less wget sudo curl unzip git mc ca-certificates gnupg2 && \
apt-get clean && rm -rf /var/lib/apt/lists/*
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y -q \
build-essential golang-go libleveldb-dev libgeos-dev && \
apt-get clean && rm -rf /var/lib/apt/lists/*
ADD split-ways.diff /root/
# Специальный патченый imposm3
RUN cd /root && git clone https://github.com/omniscale/imposm3/ go/src/github.com/omniscale/imposm3 && \
cd go/src/github.com/omniscale/imposm3 && git checkout c87a9a2b5761787a637e0fa73df9d4331846587d && \
patch -p1 < /root/split-ways.diff && make build
RUN dpkg -l | grep libgeos | awk '{print $2}' >> /root/pkg.lst
FROM debian:sid AS run
MAINTAINER Vitaliy Filippov <vitalif@mail.ru>
# Используем одинаковое начало для ускорения сборки
ADD [ "etc/apt/apt.conf", "/etc/apt/" ]
ADD etc/locale.gen /etc/locale.gen
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y -q \
less wget sudo curl unzip git mc ca-certificates gnupg2 && \
apt-get clean && rm -rf /var/lib/apt/lists/*
COPY --from=build /root/pkg.lst /root/
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y -q \
osmctools `cat /root/pkg.lst` libleveldb1v5 libdbd-pg-perl && \
apt-get clean && rm -rf /var/lib/apt/lists/*
COPY --from=build /root/go/src/github.com/omniscale/imposm3/imposm /usr/bin/imposm3
ADD home /home
CMD perl /home/osm-loader.pl