Public Repository

Last pushed: 5 months ago
Short Description
Repository for (at this moment) recent osm2pgsql releases
Full Description

osm2pgsql (unofficial)

Use osm2pgsql without installing or building it. Supported tags are 0.92.0 and latest. Image is probably bigger than it needs to be, Dockerfile from which the image was created can be found below.

Example usage

docker run --rm -it --net host \
  -e PGPASSWORD=mypassword \
  -v /home/user/osmdata/mymap.pbf:/tmp/input.pbf \
  hakvroot/osm2pgsql \
   -C 4096 -H mypostgreshost -U myuser --create --database mydatabasename /tmp/input.pbf

Dockerfile

FROM ubuntu:16.04
LABEL maintainer "<foo@bar.tld>"

RUN apt-get update && apt-get install -y \
  make \
  cmake \
  g++ \
  libboost-dev \
  libboost-system-dev \
  libboost-filesystem-dev \
  libexpat1-dev zlib1g-dev \
  libbz2-dev \
  libpq-dev \
  libgeos-dev \
  libgeos++-dev \
  libproj-dev \
  lua5.2 \
  liblua5.2-dev \
  wget \
&& rm -rf /var/lib/apt/lists/*

RUN wget https://github.com/openstreetmap/osm2pgsql/archive/0.92.0.tar.gz -O/tmp/osm2pgsql-0.92.0.tar.gz

RUN cd /tmp/ \
  && tar xvzf /tmp/osm2pgsql-0.92.0.tar.gz \
  && mkdir -p /tmp/osm2pgsql-0.92.0/build \
  && cd /tmp/osm2pgsql-0.92.0/build \
  && cmake .. \
  && make \
  && make install \
  && rm -rf /tmp/*0.92.0*

ENTRYPOINT ["osm2pgsql"]
Docker Pull Command
Owner
hakvroot

Comments (0)