forked from udacity/CppND-Route-Planning-Project
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
52 lines (38 loc) · 1.25 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
FROM selenium/standalone-chrome-debug:latest as dev
USER root
ARG DEV_DEPENDENCIES="git ca-certificates gdb net-tools"
ARG BUILD_DEPENDENCIES="build-essential cmake"
ARG THIRD_PARTY_DEPENDENCIES="libcairo2-dev libgraphicsmagick1-dev"
ARG TEST_DEPENDENCIES="libpng-dev"
WORKDIR /srv/app
COPY docker-start-script.sh .
RUN set -ex \
&& apt update -y \
# install system dependencies
&& DEBIAN_FRONTEND=noninteractive apt install -y \
${DEV_DEPENDENCIES} \
${BUILD_DEPENDENCIES} \
${THIRD_PARTY_DEPENDENCIES} \
${THIRD_PARTY_DEPENDENCIES} \
# install io2d
&& mkdir -p /opt/c++ \
&& cd /opt/c++ \
&& git clone --recurse-submodules https://github.com/cpp-io2d/P0267_RefImpl \
&& cd P0267_RefImpl \
&& mkdir Debug \
&& cd Debug \
&& cmake --config Debug "-DCMAKE_BUILD_TYPE=Debug" .. \
&& cmake --build . \
&& make install \
# clean up
&& apt autoremove \
&& apt clean \
&& rm -rf ~/.cache/* /var/lib/apt/lists/* /var/cache/apt/* /tmp/*
# VNC server
EXPOSE 5900
CMD bash -c "./docker-start-script.sh && sleep infinity"
FROM dev as run_app
WORKDIR /srv/app/build
COPY . ..
RUN cmake .. && make
CMD bash -c "../docker-start-script.sh && ./OSM_A_star_search -f ../map.osm"