|
1 | | -FROM ghcr.io/bdon/osmexpress:latest |
| 1 | +FROM ghcr.io/bdon/osmexpress:045a515132e91a3679ce3df27329937c9b8b221a |
2 | 2 |
|
3 | 3 | ENV PATH="/root/.cargo/bin:${PATH}" |
4 | 4 |
|
5 | | -RUN apk add --no-cache python3 py3-pip git bash xmlstarlet curl aws-cli py3-lxml |
| 5 | +RUN apk add --no-cache python3 py3-pip git bash curl aws-cli py3-lxml make libxml2 libgcc |
6 | 6 |
|
7 | | -RUN apk add --no-cache --virtual .build-deps build-base patch python3-dev make cmake zlib-dev expat-dev bzip2-dev boost-dev rust cargo && \ |
| 7 | +RUN apk add --no-cache --virtual .build-deps \ |
| 8 | + build-base patch python3-dev cmake zlib-dev expat-dev bzip2-dev boost-dev \ |
| 9 | + capnproto-dev clang-dev libxml2-dev pkgconfig && \ |
8 | 10 | \ |
9 | 11 | pip install --break-system-packages osmx requests osmium && \ |
10 | 12 | \ |
11 | | - echo "--- Clonando y modificando osm-cli para OpenHistoricalMap ---" && \ |
| 13 | + # Alpine's rust/cargo lag behind crate MSRVs (osmpbf/home now need rustc 1.88+), |
| 14 | + # so pull a current stable toolchain via rustup instead of the apk packages. |
| 15 | + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs \ |
| 16 | + | sh -s -- -y --profile minimal --default-toolchain stable && \ |
| 17 | + export LIBCLANG_PATH=/usr/lib && \ |
| 18 | + # musl defaults to static linking; bindgen's build script must dlopen |
| 19 | + # libclang, which a static binary can't do. Link dynamically instead. |
| 20 | + export RUSTFLAGS="-C target-feature=-crt-static" && \ |
| 21 | + \ |
| 22 | + echo "--- Build osm-cli (jake-low) with OpenHistoricalMap replication URLs ---" && \ |
12 | 23 | git clone https://github.com/jake-low/osm-cli.git /tmp/osm-cli && \ |
13 | 24 | cd /tmp/osm-cli && \ |
14 | | - echo "Cambiando URL en src/replication.rs" && \ |
15 | 25 | sed -i 's|https://planet.openstreetmap.org/replication/minute|https://s3.amazonaws.com/planet.openhistoricalmap.org/replication/minute|g' src/replication.rs && \ |
16 | | - echo "Cambiando URL en src/main.rs" && \ |
17 | 26 | sed -i 's|https://www.openstreetmap.org|https://www.openhistoricalmap.org|g' src/main.rs && \ |
18 | | - echo "Compilando osm-cli desde la fuente modificada..." && \ |
19 | | - cargo install --path . && \ |
20 | | - cd / && \ |
21 | | - rm -rf /tmp/osm-cli && \ |
| 27 | + cargo install --root /usr/local --path . && \ |
| 28 | + cd / && rm -rf /tmp/osm-cli && \ |
| 29 | + \ |
| 30 | + echo "--- Build osmx-rs (jake-low) for augmented-diff --split ---" && \ |
| 31 | + cargo install --root /usr/local --git https://github.com/jake-low/osmx-rs.git osmx-rs && \ |
22 | 32 | \ |
23 | | - apk del .build-deps && \ |
24 | | - apk add make |
| 33 | + # Binaries now live in /usr/local/bin, so the whole toolchain can go. |
| 34 | + rustup self uninstall -y && \ |
| 35 | + apk del .build-deps |
25 | 36 |
|
26 | 37 | RUN curl https://mise.jdx.dev/install.sh | sh |
27 | 38 | ENV PATH="/root/.local/bin:${PATH}" |
28 | 39 |
|
29 | 40 | WORKDIR /app |
30 | 41 |
|
31 | | -# RUN echo "Update repo 08/08/2025" |
32 | | - |
33 | | -RUN git clone https://github.com/OpenHistoricalMap/osmx-adiff-builder.git /app |
34 | | - |
35 | | -COPY *.sh . |
36 | | -COPY *.py . |
| 42 | +# Pipeline scripts come from OSMCha/osmx-adiff-builder (Rust path), customized |
| 43 | +# for OpenHistoricalMap and copied in directly instead of cloned. |
| 44 | +COPY scripts/*.sh scripts/*.py scripts/*.mk /app/ |
37 | 45 |
|
38 | 46 | RUN chmod +x /app/*.sh && chmod +x /app/*.py |
39 | 47 |
|
|
0 commit comments