Skip to content

Instantly share code, notes, and snippets.

@ImreSamu
Created August 29, 2014 14:46
Show Gist options
  • Save ImreSamu/5447252a4e750fd8c61e to your computer and use it in GitHub Desktop.
Save ImreSamu/5447252a4e750fd8c61e to your computer and use it in GitHub Desktop.
Docker file - for install osmium tool
#
# Docker file - for install osmium tool.
#
FROM ubuntu:14.04
MAINTAINER Imre Samu https://github.com/ImreSamu/
RUN export DEBIAN_FRONTEND=noninteractive
ENV DEBIAN_FRONTEND noninteractive
# Set the locale
RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
RUN apt-get -y update && apt-get -y upgrade
#-------------Application Specific Stuff ----------------------------------------------------
RUN apt-get -y install git nano mc wget sudo
RUN apt-get -y install make cmake build-essential
RUN apt-get -y install libboost-dev libboost-program-options-dev libprotobuf-dev protobuf-compiler
RUN apt-get -y install libexpat1-dev zlib1g-dev libbz2-dev libsparsehash-dev libgdal1-dev
RUN apt-get -y install libgeos++-dev libproj-dev doxygen graphviz xmlstarlet
RUN apt-get -y install libcrypto++-dev
RUN apt-get -y install cppcheck astyle pandoc
#-------------- latest libosmpbf
RUN apt-get -y install devscripts debhelper libprotobuf-java ant default-jdk maven-repo-helper
RUN mkdir -p /osm/libosmpbf
RUN cd /osm/libosmpbf && git clone https://github.com/scrosby/OSM-binary.git
RUN cd /osm/libosmpbf/OSM-binary && debuild -I -us -uc
RUN cd /osm/libosmpbf && dpkg --install libosmpbf-dev_*.deb
#-------------- libosmium from source
RUN cd /osm && git clone https://github.com/osmcode/libosmium.git
# RUN cd /osm/libosmium && git checkout master
RUN mkdir -p /osm/libosmium/build && cd /osm/libosmium/build && cmake ..
RUN cd /osm/libosmium/build && make && make install
##-------------- osmium-tool from source
RUN cd /osm && git clone https://github.com/osmcode/osmium-tool.git
RUN mkdir -p /osm/osmium-tool/build && cd /osm/osmium-tool/build && cmake ..
RUN cd /osm/osmium-tool/build && make && make install
@mmd-osm
Copy link

mmd-osm commented May 25, 2017

Unfortunately, this doesn't seem to work anymore:

 ---> Running in dd18b2679d3f
Cloning into 'osmium-tool'...
 ---> bda4297503bc
Removing intermediate container dd18b2679d3f
Step 26 : RUN mkdir -p /osm/osmium-tool/build && cd /osm/osmium-tool/build  && cmake ..
 ---> Running in 6b5625037ddd
-- The C compiler identification is GNU 4.8.4
-- The CXX compiler identification is GNU 4.8.4
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
CMake Error at /usr/share/cmake-2.8/Modules/FindBoost.cmake:1131 (message):
  Unable to find the requested Boost libraries.

  Boost version: 1.54.0

  Boost include path: /usr/include

  Detected version of Boost is too old.  Requested version was 1.55 (or
  newer).
Call Stack (most recent call first):
  CMakeLists.txt:44 (find_package)


-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.8") 
-- Looking for include file pthread.h

@mmd-osm
Copy link

mmd-osm commented May 26, 2017

osmium-tool is now part of Ubuntu 16.04:

FROM ubuntu:16.04

RUN  export DEBIAN_FRONTEND=noninteractive
ENV  DEBIAN_FRONTEND noninteractive

RUN apt-get -y update && apt-get -y upgrade

RUN apt-get -y install osmium-tool

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment