openfirmware / docker-osm2pgsql Goto Github PK
View Code? Open in Web Editor NEWDockerfile for osm2pgsql
Dockerfile for osm2pgsql
Currently checks out master when building the image. It should be more deterministic and checkout a specific commit or version when building.
# Install the things we want to stick around
RUN apk add --no-cache \
libgcc \
libstdc++ \
boost-filesystem \
boost-system \
boost-thread \
expat \
libbz2 \
postgresql-libs \
libpq \
geos \
proj \
lua5.2 \
lua5.2-libs
# Install develop tools and dependencies, build osm2pgsql and remove develop tools and dependencies
RUN apk add --no-cache --virtual .osm2pgsql-deps\
make \
cmake \
expat-dev \
g++ \
git \
boost-dev \
zlib-dev \
bzip2-dev \
proj-dev \
geos-dev \
lua5.2-dev \
postgresql-dev &&\
cd $HOME &&\
mkdir src &&\
cd src &&\
git clone --depth 1 --branch $OSM2PGSQL_VERSION https://github.com/openstreetmap/osm2pgsql.git &&\
cd osm2pgsql &&\
mkdir build &&\
cd build &&\
cmake -DLUA_LIBRARY=/usr/lib/liblua-5.2.so.0 .. &&\
make &&\
make install &&\
cd $HOME &&\
rm -rf src &&\
apk --purge del .osm2pgsql-deps
Also I would suggest to include osmctools
which are not available in Alpine but useful for osmconvert
RUN apk add --no-cache --virtual .osmctools-deps make g++ git autoconf automake libtool zlib-dev && \
git clone --depth 1 https://gitlab.com/osm-c-tools/osmctools.git && \
cd osmctools && autoreconf --install && ./configure && make install &&\
rm -rf /osmctools &&\
apk --purge del .osmctools-deps
Hi,
Building from the Dockerfile using the command from the docs: docker build -t openfirmware/osm2pgsql github.com/openfirmware/docker-osm2pgsql.git
fails and throws a "ERROR: failed to solve: ....",
Here is the complete output: https://hastebin.com/share/atowiquqov.shell
I have tried entering the command that seems to fail separately: sudo apt-get install -y -q postgresql-9.3-postgis-2.1 postgresql-contrib postgresql-server-dev-9.3
But this fails again with a bunch of "Couldn't find any package named ..."
Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package postgresql-9.3-postgis-2.1
E: Couldn't find any package by glob 'postgresql-9.3-postgis-2.1'
E: Couldn't find any package by regex 'postgresql-9.3-postgis-2.1'
E: Unable to locate package postgresql-server-dev-9.3
E: Couldn't find any package by glob 'postgresql-server-dev-9.3'
E: Couldn't find any package by regex 'postgresql-server-dev-9.3'
Any help is appreciated,
Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.