Skip to content

Commit

Permalink
chore(docker): update dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
azarz committed Feb 21, 2025
1 parent 59dad47 commit c1b0d01
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 36 deletions.
40 changes: 5 additions & 35 deletions docker/distributions/debian/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,40 +1,10 @@
### TODO : Supprimer la compilation et l'installation de Valhalla dès que l'on aura un binding NodeJS pour lui et donc repasser sur une image node
FROM node:16-bullseye as build
FROM ghcr.io/valhalla/valhalla@sha256:6fb108a960bdc63c12b1c92ab04517a0c56a019ef45c9b9c8cf847d8de9db72b

### Compilation de Valhalla
RUN apt-get update && \
apt-get install -y cmake make libtool pkg-config g++ gcc curl unzip jq lcov protobuf-compiler \
vim-common locales libcurl4-openssl-dev zlib1g-dev liblz4-dev libprotobuf-dev && \
apt-get install -y libgeos-dev libgeos++-dev libluajit-5.1-dev libspatialite-dev libsqlite3-dev wget sqlite3 spatialite-bin python3-shapely && \
apt-get install -y libsqlite3-mod-spatialite python3-pip

WORKDIR /home/prime-server
RUN apt-get install -y git cmake autoconf automake pkg-config libtool make gcc g++ lcov libcurl4-openssl-dev libzmq3-dev libczmq-dev
RUN git clone --depth 1 --recursive https://github.com/kevinkreiser/prime_server.git && cd prime_server && \
cmake -B build . && cmake --build build && make -C build install

WORKDIR /home/valhalla/
RUN pip install --upgrade "conan<2.0.0"
RUN git clone --branch 3.2.0-with_hard_exclude --depth 1 --recursive https://github.com/IGNF/valhalla.git && cd valhalla && \
mkdir build && cmake -B build -DCMAKE_BUILD_TYPE=Release && make -C build && make -C build package

FROM node:16-bullseye as road2

### Installation des dépendances pour Valhalla et prime-server
RUN apt-get update && \
apt-get install -y libtool pkg-config curl unzip jq lcov protobuf-compiler \
vim-common locales libcurl4-openssl-dev zlib1g-dev liblz4-dev libprotobuf-dev \
libgeos-dev libgeos++-dev libluajit-5.1-dev libspatialite-dev libsqlite3-dev wget sqlite3 spatialite-bin python3-shapely \
libsqlite3-mod-spatialite libzmq3-dev libczmq-dev

### Installation prime-server
COPY --from=build /usr/local/lib/libprime_server.so.0.7.1 /usr/lib/libprime_server.so.0.0.0
COPY --from=build /usr/local/lib/libprime_server.so.0 /usr/lib/libprime_server.so.0
COPY --from=build /usr/local/lib/libprime_server.so /usr/lib/libprime_server.so

### Installation de valhalla
COPY --from=build /home/valhalla/valhalla/build/valhalla-3.2.0-Linux.tar.gz ./
RUN tar -xzvf valhalla-3.2.0-Linux.tar.gz && cd valhalla-3.2.0-Linux && cp -r bin/* /usr/bin/ && cp -r lib/* /usr/lib/ && cp -r include/* /usr/include/ && cp -r share/* /usr/share/
### Mise à jour des
RUN apt-get update && apt-get upgrade -y
RUN curl -fsSL https://deb.nodesource.com/setup_22.x | bash - && \
apt-get install -y nodejs

### Dossier contenant la configuration de Road2
WORKDIR /home/docker/config
Expand Down
2 changes: 1 addition & 1 deletion documentation/docker/distributions/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

Pour construire l'image, il suffit de lancer la commande suivante à la racine du projet Road2:
```
docker build -t road2-debian -f docker/debian/Dockerfile .
docker build -t road2-debian -f docker/distributions/debian/Dockerfile .
```

## Lancer l'application
Expand Down

0 comments on commit c1b0d01

Please sign in to comment.