Skip to content

Instantly share code, notes, and snippets.

@kirel
Created August 19, 2016 14:59
Show Gist options
  • Save kirel/c25aeef572ac55f0d67a3c3cc2bc88cd to your computer and use it in GitHub Desktop.
Save kirel/c25aeef572ac55f0d67a3c3cc2bc88cd to your computer and use it in GitHub Desktop.
FROM cartography/osrm-backend-docker
RUN apt-get update && apt-get install -y software-properties-common && add-apt-repository ppa:ubuntu-toolchain-r/test
RUN curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
RUN apt-get update && apt-get install -y wget nodejs g++-4.9
RUN apt-get update && apt-get remove -y lua5.1 liblua5.1-0-dev libluajit-5.1-dev \
&& apt-get autoremove -y \
&& apt-get install -y wget lua5.2 liblua5.2-dev libluabind-dev
RUN rm /usr/bin/g++ /usr/bin/gcc && ln -s /usr/bin/gcc-4.9 /usr/bin/gcc && ln -s /usr/bin/g++-4.9 /usr/bin/g++
RUN git clone --depth 1 https://github.com/niemeier-PSI/osrm-backend.git -b table-distances /osrm-src \
&& rm -rf ./* \
&& cmake /osrm-src -DCMAKE_BUILD_TYPE=Release\
&& cmake --build . \
&& cmake --build . --target install \
&& mv /osrm-src/profiles/foot.lua profile.lua \
&& mv /osrm-src/profiles/lib/ lib \
&& echo "disk=/tmp/stxxl,25000,syscall" > .stxxl \
&& rm -rf /osrm-src
RUN npm install --unsafe-perm osrm # in osrm-build
RUN apt-get clean \
&& rm -rf /var/lib/apt/lists/*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment