-
Notifications
You must be signed in to change notification settings - Fork 58
/
Dockerfile
63 lines (48 loc) · 1.86 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
FROM debian:trixie-slim as builder
LABEL [email protected]
WORKDIR /
RUN echo "Updating apt-get and installing dependencies..." && \
apt-get -y update > /dev/null && apt-get -y install > /dev/null \
git-core \
build-essential \
g++ \
libssl-dev \
libasio-dev \
libglpk-dev \
pkg-config
ARG VROOM_EXPRESS_RELEASE=master
# clone here, since the runner image doesn't have git installed
RUN echo "Cloning and installing vroom-express release/branch ${VROOM_EXPRESS_RELEASE}..." && \
git clone --branch $VROOM_EXPRESS_RELEASE --single-branch https://github.com/VROOM-Project/vroom-express.git
ARG VROOM_RELEASE=master
RUN echo "Cloning and installing vroom release/branch ${VROOM_RELEASE}..." && \
git clone --branch $VROOM_RELEASE --single-branch --recurse-submodules https://github.com/VROOM-Project/vroom.git && \
cd vroom && \
make -C /vroom/src -j$(nproc)
FROM node:20-bookworm-slim as runstage
COPY --from=builder /vroom-express/. /vroom-express
COPY --from=builder /vroom/bin/vroom /usr/local/bin
WORKDIR /vroom-express
RUN apt-get update > /dev/null && \
apt-get install -y --no-install-recommends \
libssl3 \
curl \
libglpk40 \
> /dev/null && \
rm -rf /var/lib/apt/lists/* && \
# Install vroom-express
npm config set loglevel error && \
npm install && \
# To share the config.yml & access.log file with the host
mkdir /conf
#Upgrade glibc
RUN echo "deb http://ftp.debian.org/debian trixie main" >> /etc/apt/sources.list && \
apt-get update > /dev/null && \
apt-get -t trixie install libc6 libc6-dev libc6-dbg libstdc++6 libgcc-s1 libzstd1 -y
COPY ./docker-entrypoint.sh /docker-entrypoint.sh
ENV VROOM_DOCKER=osrm \
VROOM_LOG=/conf
HEALTHCHECK --start-period=10s CMD curl --fail -s http://localhost:3000/health || exit 1
EXPOSE 3000
ENTRYPOINT ["/bin/bash"]
CMD ["/docker-entrypoint.sh"]