forked from peter-evans/osrm-backend-k8s
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
64 lines (57 loc) · 1.82 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
FROM peterevans/xenial-gcloud:1.2.23
LABEL \
maintainer="Peter Evans <mail@peterevans.dev>" \
org.opencontainers.image.title="osrm-backend-k8s" \
org.opencontainers.image.description="Open Source Routing Machine (OSRM) osrm-backend for Kubernetes on Google Container Engine (GKE)." \
org.opencontainers.image.authors="Peter Evans <mail@peterevans.dev>" \
org.opencontainers.image.url="https://github.com/peter-evans/osrm-backend-k8s" \
org.opencontainers.image.vendor="https://peterevans.dev" \
org.opencontainers.image.licenses="MIT"
ENV OSRM_VERSION 5.22.0
# Let the container know that there is no TTY
ARG DEBIAN_FRONTEND=noninteractive
# Install packages
RUN apt-get -y update \
&& apt-get install -y -qq --no-install-recommends \
build-essential \
cmake \
curl \
libbz2-dev \
libstxxl-dev \
libstxxl1v5 \
libxml2-dev \
libzip-dev \
libboost-all-dev \
lua5.2 \
liblua5.2-dev \
libtbb-dev \
libluabind-dev \
pkg-config \
gcc \
python-dev \
python-setuptools \
&& apt-get clean \
&& easy_install -U pip \
&& pip install -U crcmod \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /tmp/* /var/tmp/*
# Build osrm-backend
RUN mkdir /osrm-src \
&& cd /osrm-src \
&& curl --silent -L https://github.com/Project-OSRM/osrm-backend/archive/v$OSRM_VERSION.tar.gz -o v$OSRM_VERSION.tar.gz \
&& tar xzf v$OSRM_VERSION.tar.gz \
&& cd osrm-backend-$OSRM_VERSION \
&& mkdir build \
&& cd build \
&& cmake .. -DCMAKE_BUILD_TYPE=Release \
&& cmake --build . \
&& cmake --build . --target install \
&& mkdir /osrm-data \
&& mkdir /osrm-profiles \
&& cp -r /osrm-src/osrm-backend-$OSRM_VERSION/profiles/* /osrm-profiles \
&& rm -rf /osrm-src
# Set the entrypoint
COPY docker-entrypoint.sh /
RUN chmod +x /docker-entrypoint.sh
ENTRYPOINT ["/docker-entrypoint.sh"]
EXPOSE 5000