Установка 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…») |
|||
Строка 4: | Строка 4: | ||
<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> | ||
Версия 22:49, 13 июня 2016
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
wget https://github.com/Project-OSRM/osrm-backend/archive/v5.1.0.tar.gz && \
tar -xzf v5.1.0.tar.gz
mkdir -p build && \
cd build && \
cmake .. -DCMAKE_BUILD_TYPE=Release && \
cmake --build . && \
sudo cmake --build . --target install
установка 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