From 84db1ca075dc63ccb02da825948d95ad09f94e4d Mon Sep 17 00:00:00 2001 From: Ariel Costas Guerrero Date: Thu, 26 Mar 2026 09:53:39 +0100 Subject: Convert submodules to regular repo files, add custom feeds --- build_renfe/Dockerfile | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 build_renfe/Dockerfile (limited to 'build_renfe/Dockerfile') diff --git a/build_renfe/Dockerfile b/build_renfe/Dockerfile new file mode 100644 index 0000000..f565320 --- /dev/null +++ b/build_renfe/Dockerfile @@ -0,0 +1,25 @@ +# Use a multi-stage build to download necessary files +FROM alpine/curl AS downloader + +RUN curl -L https://download.geofabrik.de/europe/spain/galicia-latest.osm.pbf -o /galicia-latest.osm.pbf +RUN curl -L https://raw.githubusercontent.com/railnova/osrm-train-profile/refs/heads/master/basic.lua -o /opt/train.lua + +FROM osrm/osrm-backend + +# Copy the downloaded OSM file from the downloader stage +COPY --from=downloader /galicia-latest.osm.pbf /data/galicia-latest.osm.pbf +COPY --from=downloader /opt/train.lua /opt/train.lua + +# Extract the map data using osrm-train-profile (by Railnova) +RUN osrm-extract -p /opt/train.lua /data/galicia-latest.osm.pbf + +# Prepare the map data for routing +RUN osrm-partition /data/galicia-latest.osrm +RUN osrm-customize /data/galicia-latest.osrm + +# Expose the OSRM server port +EXPOSE 5000 + +# Start the OSRM server +CMD ["osrm-routed", "--algorithm", "mld", "/data/galicia-latest.osrm"] + -- cgit v1.3