Установка OSRM на Debian Jessie — различия между версиями

Материал из razgovorov.ru
Перейти к: навигация, поиск
 
Строка 1: Строка 1:
 
[https://github.com/Project-OSRM OSRM]
 
[https://github.com/Project-OSRM OSRM]
 +
=[https://github.com/Project-OSRM/osrm-backend BackEnd]=
  
 
Dockerfile для Debian jessie
 
Dockerfile для Debian jessie
Строка 33: Строка 34:
 
</source>
 
</source>
  
 +
=[https://github.com/Project-OSRM/osrm-frontend]=
 
<source lang=bash>
 
<source lang=bash>
wget https://github.com/Project-OSRM/osrm-backend/archive/v5.1.0.tar.gz && \
+
FROM debian:jessie
tar -xzf v5.1.0.tar.gz
+
 
mkdir -p build && \  
+
RUN \
cd build && \
+
  DEBIAN_FRONTEND=noninteractive apt-get update && \
cmake .. -DCMAKE_BUILD_TYPE=Release && \
+
  DEBIAN_FRONTEND=noninteractive apt-get install -y \
cmake --build . && \
+
      curl && \
sudo cmake --build . --target install  
+
  curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash - && \
 +
  DEBIAN_FRONTEND=noninteractive apt-get install -y nodejs npm && \
 +
  npm install -g browserify
 +
 
 +
 
 +
RUN \
 +
  wget /opt https://github.com/Project-OSRM/osrm-backend/archive/v5.1.0.tar.gz -O - \
 +
  | tar -xz -C /tmp && \
 +
  mkdir -p /opt/osrm && \
 +
  cd /opt/osrm && \
 +
  cmake /tmp/osrm-backend-5.1.0 -DCMAKE_BUILD_TYPE=Release && \
 +
  cmake --build . && \
 +
  cmake --build . --target install && \
 +
  mv /tmp/osrm-backend-5.1.0/profiles/car.lua profile.lua && \
 +
  mv /tmp/osrm-backend-5.1.0/profiles/lib/ lib && \
 +
  rm -rf /tmp/osrm-backend-5.1.0
 +
WORKDIR /opt/osrm
 +
ADD run.sh run.sh
 +
EXPOSE 5000
 
</source>
 
</source>
  
установка docker
+
=Установка docker=
 
добавляем в конец /etc/apt/sources.list
 
добавляем в конец /etc/apt/sources.list
 
<source lang=bash>
 
<source lang=bash>

Текущая версия на 23:17, 13 июня 2016

OSRM

BackEnd

Dockerfile для Debian jessie

FROM debian:jessie

RUN \
  DEBIAN_FRONTEND=noninteractive apt-get update && \
  DEBIAN_FRONTEND=noninteractive apt-get install -y \
    git apt-utils libstxxl-dev libxml2-dev libsparsehash-dev \
    libbz2-dev libzip-dev libgomp1 liblua5.1-0-dev libluabind-dev \
    pkg-config libgdal-dev libtbb-dev libexpat1-dev \
    libboost-dev libboost-filesystem-dev libboost-thread-dev  \
    libboost-system-dev libboost-regex-dev  libboost-program-options-dev  \
    libboost-iostreams-dev libboost-test-dev \
    g++ zlib1g-dev cmake wget

RUN \
  wget /opt https://github.com/Project-OSRM/osrm-backend/archive/v5.1.0.tar.gz -O - \
  | tar -xz -C /tmp && \
  mkdir -p /opt/osrm && \
  cd /opt/osrm && \
  cmake /tmp/osrm-backend-5.1.0 -DCMAKE_BUILD_TYPE=Release  && \
  cmake --build .  && \
  cmake --build . --target install && \
  mv /tmp/osrm-backend-5.1.0/profiles/car.lua profile.lua && \
  mv /tmp/osrm-backend-5.1.0/profiles/lib/ lib && \
  rm -rf /tmp/osrm-backend-5.1.0
WORKDIR /opt/osrm
ADD run.sh run.sh
EXPOSE 5000

[1]

FROM debian:jessie

RUN \
  DEBIAN_FRONTEND=noninteractive apt-get update && \
  DEBIAN_FRONTEND=noninteractive apt-get install -y \
      curl && \
  curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash - && \
  DEBIAN_FRONTEND=noninteractive apt-get install -y nodejs npm && \
  npm install -g browserify


RUN \
  wget /opt https://github.com/Project-OSRM/osrm-backend/archive/v5.1.0.tar.gz -O - \
  | tar -xz -C /tmp && \
  mkdir -p /opt/osrm && \
  cd /opt/osrm && \
  cmake /tmp/osrm-backend-5.1.0 -DCMAKE_BUILD_TYPE=Release  && \
  cmake --build .  && \
  cmake --build . --target install && \
  mv /tmp/osrm-backend-5.1.0/profiles/car.lua profile.lua && \
  mv /tmp/osrm-backend-5.1.0/profiles/lib/ lib && \
  rm -rf /tmp/osrm-backend-5.1.0
WORKDIR /opt/osrm
ADD run.sh run.sh
EXPOSE 5000

Установка docker

добавляем в конец /etc/apt/sources.list

deb http://ftp.debian.org/debian jessie-backports main

Обновляем репозиторий и устанавливаем докер

apt-get update
apt-get install docker.io


делаем папаку кладем туда Dockerfile, создаем контейнер docker build -t [имя группы]/[имя контейнера] [папка с dockerfile]

docker build -t businka/osrm ./osrm