@@ -3,9 +3,12 @@ ARG DOCKER_TAG
3
3
ARG BUILD_CONCURRENCY
4
4
RUN mkdir -p /src && mkdir -p /opt
5
5
6
+
6
7
RUN apt-get update && \
7
- apt-get -y --no-install-recommends install ca-certificates cmake make git gcc g++ libbz2-dev libxml2-dev wget \
8
+ apt-get -y --no-install-recommends install ca-certificates curl cmake make git gcc g++ libbz2-dev libxml2-dev wget \
8
9
libzip-dev libboost1.74-all-dev lua5.4 liblua5.4-dev -o APT::Install-Suggests=0 -o APT::Install-Recommends=0
10
+ RUN curl -fsSL https://deb.nodesource.com/setup_14.x | bash - && \
11
+ apt-get install -y nodejs
9
12
10
13
RUN NPROC=${BUILD_CONCURRENCY:-$(nproc)} && \
11
14
ldconfig /usr/local/lib && \
@@ -32,36 +35,33 @@ RUN NPROC=${BUILD_CONCURRENCY:-$(nproc)} && \
32
35
case ${DOCKER_TAG} in *"-debug" *) BUILD_TYPE="Debug" ;; esac && \
33
36
case ${DOCKER_TAG} in *"-assertions" *) BUILD_TYPE="RelWithDebInfo" && ENABLE_ASSERTIONS="On" && BUILD_TOOLS="On" ;; esac && \
34
37
echo "Building ${BUILD_TYPE} with ENABLE_ASSERTIONS=${ENABLE_ASSERTIONS} BUILD_TOOLS=${BUILD_TOOLS}" && \
35
- cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DENABLE_ASSERTIONS=${ENABLE_ASSERTIONS} -DBUILD_TOOLS=${BUILD_TOOLS} -DENABLE_LTO=On && \
38
+ cmake .. -DENABLE_NODE_BINDINGS=ON - DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DENABLE_ASSERTIONS=${ENABLE_ASSERTIONS} -DBUILD_TOOLS=${BUILD_TOOLS} -DENABLE_LTO=On && \
36
39
make -j${NPROC} install && \
37
- cd ../profiles && \
38
- cp -r * /opt && \
39
- strip /usr/local/bin/* && \
40
- rm -rf /src /usr/local/lib/libosrm*
41
-
40
+ cd .. && \z
41
+ npm install -g --only=production
42
42
43
- # Multistage build to reduce image size - https://docs.docker.com/engine/userguide/eng-image/multistage-build/#use-multi-stage-builds
44
- # Only the content below ends up in the image, this helps remove /src from the image (which is large)
45
- FROM debian:bullseye-slim as runstage
43
+ # # Multistage build to reduce image size - https://docs.docker.com/engine/userguide/eng-image/multistage-build/#use-multi-stage-builds
44
+ # # Only the content below ends up in the image, this helps remove /src from the image (which is large)
45
+ # FROM debian:bullseye-slim as runstage
46
46
47
- COPY --from=builder /usr/local /usr/local
48
- COPY --from=builder /opt /opt
47
+ # COPY --from=builder /usr/local /usr/local
48
+ # COPY --from=builder /opt /opt
49
49
50
- RUN apt-get update && \
51
- apt-get install -y --no-install-recommends libboost-program-options1.74.0 libboost-regex1.74.0 \
52
- libboost-date-time1.74.0 libboost-chrono1.74.0 libboost-filesystem1.74.0 \
53
- libboost-iostreams1.74.0 libboost-system1.74.0 libboost-thread1.74.0 \
54
- expat liblua5.4-0 && \
55
- rm -rf /var/lib/apt/lists/* && \
56
- # add /usr/local/lib to ldconfig to allow loading libraries from there
57
- ldconfig /usr/local/lib
50
+ # RUN apt-get update && \
51
+ # apt-get install -y --no-install-recommends libboost-program-options1.74.0 libboost-regex1.74.0 \
52
+ # libboost-date-time1.74.0 libboost-chrono1.74.0 libboost-filesystem1.74.0 \
53
+ # libboost-iostreams1.74.0 libboost-system1.74.0 libboost-thread1.74.0 \
54
+ # expat liblua5.4-0 && \
55
+ # rm -rf /var/lib/apt/lists/* && \
56
+ # # add /usr/local/lib to ldconfig to allow loading libraries from there
57
+ # ldconfig /usr/local/lib
58
58
59
- RUN /usr/local/bin/osrm-extract --help && \
60
- /usr/local/bin/osrm-routed --help && \
61
- /usr/local/bin/osrm-contract --help && \
62
- /usr/local/bin/osrm-partition --help && \
63
- /usr/local/bin/osrm-customize --help
59
+ # RUN /usr/local/bin/osrm-extract --help && \
60
+ # /usr/local/bin/osrm-routed --help && \
61
+ # /usr/local/bin/osrm-contract --help && \
62
+ # /usr/local/bin/osrm-partition --help && \
63
+ # /usr/local/bin/osrm-customize --help
64
64
65
- WORKDIR /opt
65
+ # WORKDIR /opt
66
66
67
- EXPOSE 5000
67
+ # EXPOSE 5000
0 commit comments