Add docker port of build instructions
This commit is contained in:
parent
b526cadebd
commit
c43c043521
22
docker/Dockerfile
Normal file
22
docker/Dockerfile
Normal file
@ -0,0 +1,22 @@
|
||||
FROM ubuntu:14.04
|
||||
|
||||
RUN apt-get update -y && \
|
||||
apt-get install -y build-essential git-core python-pip python-software-properties software-properties-common && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN apt-get -y install gcc-4.8 g++-4.8 curl automake gdb libtool make cmake pkg-config libboost1.55-dev llvm-3.4 \
|
||||
protobuf-compiler libprotoc-dev libprotobuf7 libprotobuf-dev libbz2-dev libstxxl-dev libstxxl1 libxml2-dev \
|
||||
libzip-dev lua5.1 liblua5.1-0-dev rubygems libtbb-dev libgdal-dev && \
|
||||
pip install awscli
|
||||
|
||||
# luabind
|
||||
RUN curl https://gist.githubusercontent.com/DennisOSRM/f2eb7b948e6fe1ae319e/raw/install-luabind.sh | sudo bash
|
||||
# osmosis
|
||||
RUN curl -s https://gist.githubusercontent.com/DennisOSRM/803a64a9178ec375069f/raw/ | sudo bash
|
||||
# osmpbf library
|
||||
RUN curl -s https://gist.githubusercontent.com/DennisOSRM/13b1b4fe38a57ead850e/raw/install_osmpbf.sh | sudo bash
|
||||
|
||||
RUN useradd -ms /bin/bash mapbox
|
||||
USER mapbox
|
||||
ENV HOME /home/mapbox
|
||||
WORKDIR /home/mapbox
|
15
docker/run-gcc.sh
Executable file
15
docker/run-gcc.sh
Executable file
@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
docker build \
|
||||
-t mapbox/osrm:linux \
|
||||
docker/
|
||||
|
||||
docker run \
|
||||
-i \
|
||||
-e "CXX=g++" \
|
||||
-v `pwd`:/home/mapbox/build \
|
||||
-t mapbox/osrm:linux \
|
||||
build/docker/test.sh
|
24
docker/test.sh
Executable file
24
docker/test.sh
Executable file
@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
export TRAVIS_OS_NAME=linux
|
||||
export CMAKEOPTIONS="-DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=g++-4.8"
|
||||
export OSRM_PORT=5000
|
||||
export OSRM_TIMEOUT=60
|
||||
|
||||
rvm use 1.9.3
|
||||
gem install bundler
|
||||
bundle install
|
||||
|
||||
mkdir -p build
|
||||
cd build
|
||||
cmake .. $CMAKEOPTIONS -DBUILD_TOOLS=1
|
||||
|
||||
make -j`nproc`
|
||||
make tests -j`nproc`
|
||||
./datastructure-tests
|
||||
./algorithm-tests
|
||||
cd ..
|
||||
cucumber -p verify
|
Loading…
Reference in New Issue
Block a user