Установка OSRM на Debian Jessie — различия между версиями
(Новая страница: «[https://github.com/Project-OSRM OSRM] Dockerfile для Debian jessie <source lang=bash> FROM debian:jessie RUN \ DEBIAN_FRONTEND=noninteractive apt-get u…») |
|||
(не показана 1 промежуточная версия этого же участника) | |||
Строка 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 | ||
<source lang=bash> | <source lang=bash> | ||
− | |||
FROM debian:jessie | FROM debian:jessie | ||
RUN \ | RUN \ | ||
− | DEBIAN_FRONTEND=noninteractive | + | DEBIAN_FRONTEND=noninteractive apt-get update && \ |
− | DEBIAN_FRONTEND=noninteractive | + | 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 \ | 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 && \ | |
− | rm -rf / | + | cd /opt/osrm && \ |
− | WORKDIR / | + | 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 | ADD run.sh run.sh | ||
EXPOSE 5000 | EXPOSE 5000 | ||
− | |||
</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 - | + | |
− | mkdir -p | + | RUN \ |
− | cd | + | DEBIAN_FRONTEND=noninteractive apt-get update && \ |
− | cmake .. -DCMAKE_BUILD_TYPE=Release && \ | + | DEBIAN_FRONTEND=noninteractive apt-get install -y \ |
− | cmake --build . && \ | + | 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 | ||
</source> | </source> | ||
− | + | =Установка docker= | |
добавляем в конец /etc/apt/sources.list | добавляем в конец /etc/apt/sources.list | ||
<source lang=bash> | <source lang=bash> |
Текущая версия на 23:17, 13 июня 2016
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