Skip to content

Add pgrouting 3.8 with pg13-17, postgis3.5#69

Merged
sanak merged 4 commits intomasterfrom
add-3.8-for-pg-16-17
May 10, 2025
Merged

Add pgrouting 3.8 with pg13-17, postgis3.5#69
sanak merged 4 commits intomasterfrom
add-3.8-for-pg-16-17

Conversation

@sanak
Copy link
Member

@sanak sanak commented May 1, 2025

Changes proposed in this pull request:

  • Add pgrouting 3.8 with pg13-17, postgis3.5
  • Fix README.md internal links
  • Fix README.md badges
    • Before fix:
      • docker-pgrouting-badges-before-fix
    • After fix:
      • docker-pgrouting-badges-after-fix

I feel adding pgrouting 3.8 to all combination and removing pgrouting 3.6 may be a bit early, so I just added pgrouting 3.8 to pg13-17.

@pgRouting/admins

Summary by CodeRabbit

  • New Features

    • Added Docker images for pgRouting 3.8.0 with PostGIS 3.5 on PostgreSQL versions 13, 14, 15, 16, and 17.
    • Provided Docker Compose files for each version, enabling easy setup and persistent storage.
    • Included optional images with osm2pgrouting 2.3.8 and Osmium tools for advanced routing workflows.
    • Added version files for clear identification of each image release.
  • Documentation

    • Added and updated README files for each new version, detailing usage and image specifics.
    • Updated main README with new badges and expanded version listings for all supported images.

@sanak sanak self-assigned this May 1, 2025
@coderabbitai
Copy link

coderabbitai bot commented May 1, 2025

Walkthrough

This update introduces new Docker build and deployment configurations for pgRouting version 3.8.0, supporting PostgreSQL versions 13 through 17, each paired with PostGIS 3.5. For each supported version, the update adds a main Dockerfile to build pgRouting from source, a README, a docker-compose.yml for service orchestration, an optional extra Dockerfile for osm2pgrouting support, and a version.txt file. The root README.md is updated to document these new versions and adjust badges. All Dockerfiles follow a consistent pattern of installing dependencies, building from source, and cleaning up to minimize image size.

Changes

Files/Paths Change Summary
13-3.5-3.8/Dockerfile, 14-3.5-3.8/Dockerfile, 15-3.5-3.8/Dockerfile, 16-3.5-3.8/Dockerfile, 17-3.5-3.8/Dockerfile New Dockerfiles to build pgRouting 3.8.0 images on PostGIS 3.5 for PostgreSQL 13–17; install dependencies, build from source, clean up.
13-3.5-3.8/README.md, 14-3.5-3.8/README.md, 15-3.5-3.8/README.md, 16-3.5-3.8/README.md, 17-3.5-3.8/README.md New README files documenting each pgRouting 3.8.0 Docker image for PostgreSQL 13–17 with PostGIS 3.5.
13-3.5-3.8/docker-compose.yml, 14-3.5-3.8/docker-compose.yml, 15-3.5-3.8/docker-compose.yml, 16-3.5-3.8/docker-compose.yml, 17-3.5-3.8/docker-compose.yml New Docker Compose files defining a pgrouting service for each version, with port mapping, persistent volume, and environment variable.
13-3.5-3.8/extra/Dockerfile, 14-3.5-3.8/extra/Dockerfile, 15-3.5-3.8/extra/Dockerfile, 16-3.5-3.8/extra/Dockerfile, 17-3.5-3.8/extra/Dockerfile New "extra" Dockerfiles to build and install osm2pgrouting 2.3.8 and its dependencies for each base pgRouting image.
13-3.5-3.8/version.txt, 14-3.5-3.8/version.txt, 15-3.5-3.8/version.txt, 16-3.5-3.8/version.txt, 17-3.5-3.8/version.txt New version.txt files specifying the version string for each Docker image.
README.md Updated: New build/pull badges, added documentation for all new pgRouting 3.8.0 images, reordered and clarified version listings.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Docker Compose
    participant pgRouting Container
    participant PostGIS/PostgreSQL
    participant Volume

    User->>Docker Compose: docker-compose up
    Docker Compose->>pgRouting Container: Start container (pgRouting + PostGIS)
    pgRouting Container->>PostGIS/PostgreSQL: Initialize/PostgreSQL startup
    pgRouting Container->>Volume: Mount /var/lib/postgresql/data
    User->>pgRouting Container: Connect via port 5432
    Note right of pgRouting Container: pgRouting 3.8.0 available
Loading

Poem

🐇
Dockerfiles sprout for each Postgres age,
With pgRouting 3.8.0 center stage!
Compose files and READMEs join the show,
Version tags line up in a tidy row.
Osm2pgrouting hops in for extra fun—
This rabbit’s work is nearly done!
🥕


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@sanak
Copy link
Member Author

sanak commented May 2, 2025

Well, I also added pgrouting 3.8 with pg13-15, postgis3.5.
The latest pgrouting version on AWS RDS is still 3.6.3, so keeping 3.6 for a while will be better.
https://docs.aws.amazon.com/AmazonRDS/latest/PostgreSQLReleaseNotes/postgresql-versions.html#postgresql-version17

The pgrouting extension was updated to version 3.6.3.

@sanak sanak changed the title Add pgrouting 3.8 with pg16-17, postgis3.5 Add pgrouting 3.8 with pg13-17, postgis3.5 May 2, 2025
@sanak sanak marked this pull request as ready for review May 2, 2025 14:04
@sanak sanak requested review from iosefa, krashish8 and robe2 May 2, 2025 14:04
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

♻️ Duplicate comments (19)
17-3.5-3.8/docker-compose.yml (1)

1-12: (Duplication) See suggestions on metadata and isolation in 14-3.5-3.8/docker-compose.yml.

13-3.5-3.8/docker-compose.yml (1)

1-12: (Duplication) See suggestions on metadata and isolation in 14-3.5-3.8/docker-compose.yml.

16-3.5-3.8/docker-compose.yml (1)

1-12: (Duplication) See suggestions on metadata and isolation in 14-3.5-3.8/docker-compose.yml.

17-3.5-3.8/extra/Dockerfile (4)

5-18: See previous feedback on combining and optimizing apt steps.


19-21: See previous feedback on adding checksum verification.


28-35: See previous feedback on targeted cleanup instead of rm -rf ./*.


36-45: See previous feedback on using apt-get --no-install-recommends and merging purge steps.

13-3.5-3.8/Dockerfile (1)

8-25: See feedback on consolidating apt-get commands and using --no-install-recommends.

17-3.5-3.8/Dockerfile (4)

1-4: Verify PG_MAJOR & standardize labels
Same as in the 16-3.5 Dockerfile: confirm PG_MAJOR is set, and consider adding VCS/maintainer labels for version traceability.


5-7: Promote version flexibility with build args
Mirroring the 16-3.5 suggestion: use ARG for PGROUTING_VERSION and PGROUTING_SHA256 to decouple build-time parameters from runtime environment.


8-50: Merge apt operations into a single RUN
As above, consolidate apt-get update, installations, source fetch, build, and cleanup into one optimized RUN to reduce layers and leverage --no-install-recommends.


51-52: Explain PostGIS init script deletion
Also applies here: ensure the removal of 10_postgis.sh is documented to avoid confusion for users expecting PostGIS bootstrap.

14-3.5-3.8/extra/Dockerfile (4)

1-4: Apply same version-arg refactor as in 13-3.5-3.8/extra Dockerfile
Refer to the suggestion to use ARG for OSM2PGROUTING_VERSION and conditionally export it.


5-18: Consolidate apt-get installation
See the combined apt-get pattern recommended in the 13-3.5-3.8 extra Dockerfile for minimal layers and --no-install-recommends.


19-34: Simplify tar extraction & build steps
The approach suggested for the 13-3.5-3.8 extra Dockerfile applies here as well: use tar -xzf … --strip-components=1 and consider multi-stage for build deps.


35-46: Merge cleanup steps
Align with the same cleanup consolidation advice given for the 13-3.5-3.8 extra Dockerfile.

14-3.5-3.8/Dockerfile (3)

1-4: Confirm base image variables and add rich labels
Same as for the 16-3.5/17-3.5 Dockerfiles: ensure PG_MAJOR is set and enrich the image with standardized VCS/maintainer labels.


5-7: Switch pgRouting version & checksum to build args
Apply the ARG-based refactor for PGROUTING_VERSION and SHA256 as suggested in the other main Dockerfiles for consistency.


51-52: Document init script removal
Ensure users understand why 10_postgis.sh is removed; refer to the note provided in the other main Dockerfiles.

🧹 Nitpick comments (22)
17-3.5-3.8/README.md (1)

1-4: Add usage instructions and pin base image tags.
The README introduces the pgRouting 3.8.0 image but omits concrete usage examples (e.g., how to docker pull or docker build). Also, consider pinning the PostGIS base image to a specific tag (e.g., postgis/postgis:17-3.5) for reproducible builds instead of the generic postgis/postgis link.

14-3.5-3.8/README.md (1)

1-4: Pin the PostGIS base image and include build instructions.
To improve reproducibility, specify the exact base image tag (e.g., postgis/postgis:14-3.5). Adding a brief build or pull example—such as a docker pull pgrouting/pgrouting:3.8-pg14-postgis3.5 command—would help users get started quickly.

16-3.5-3.8/README.md (1)

1-4: Reference the extra build for osm2pgrouting support.
This directory includes an extra/Dockerfile for building osm2pgrouting. It would be helpful to mention in the README how users can use this subdirectory to build the osm2pgrouting variant or provide a link to extra/Dockerfile.

15-3.5-3.8/README.md (1)

1-4: Provide reproducible base image and quickstart section.
Consider updating the PostGIS link to a pinned tag (e.g., postgis/postgis:15-3.5) and adding a Quickstart section with commands for pulling and running the container. This will lower the barrier for new users.

13-3.5-3.8/README.md (1)

1-4: Enhance README with specific tags and usage.
The README is concise but would benefit from explicit pull/build commands and pinning the base image to postgis/postgis:13-3.5. Consider expanding with minimal usage snippets and a note on where to find the corresponding Dockerfiles in this directory.

14-3.5-3.8/docker-compose.yml (1)

1-12: Enhance Docker Compose metadata and isolation.

To make this Compose file more robust and avoid resource collisions when running multiple versions in parallel, consider:

  • Adding an explicit format version at the top, e.g.
    version: "3.8"
  • Scoping the volume name to this version (e.g. db-data-14-3.5-3.8.0) so it doesn’t clash with other setups.
  • Optionally adding:
    restart: unless-stopped
    container_name: pgrouting-14-3.5-3.8.0
    for clearer container identity and automatic recovery.
15-3.5-3.8/docker-compose.yml (2)

4-5: Consider making host port configurable.
Exposing "5432:5432" by default is fine for local development, but you may want to allow overriding the host port (e.g., via .env or variable interpolation) to avoid collisions in multi-service setups.


8-9: Avoid hardcoding the database password in source.
Defining POSTGRES_PASSWORD=postgres directly in the compose file poses a security risk if this is used beyond local testing. Consider loading this from an environment variable or Docker secret instead.

15-3.5-3.8/extra/Dockerfile (3)

5-18: Combine and optimize apt install steps.
You currently run two separate apt install -y commands. To reduce image layers and ensure non-interactive installs, merge them into a single apt-get install -y --no-install-recommends invocation.


28-35: Scope of source cleanup is too broad.
Running rm -rf ./* in /usr/local/src may remove unintended files. Instead, target only the extracted directory and archive (e.g., rm -rf osm2pgrouting-${OSM2PGROUTING_VERSION}*).


36-45: Use apt-get with --no-install-recommends and combine purge steps.
For consistency and smaller images, switch from apt to apt-get, merge purge and autoremove flags, and collapse into fewer RUN layers.

15-3.5-3.8/Dockerfile (1)

8-17: Optimize package installation.
Combine runtime and build dependencies into a single apt-get update && apt-get install -y --no-install-recommends step to reduce layers, and prefer apt-get over apt in Dockerfiles.

16-3.5-3.8/Dockerfile (2)

5-7: Use build-time args for version and checksum
Exposing these as runtime ENV increases image metadata. Switch to ARG to allow overrides and only export ENV if truly needed at runtime:

- ENV PGROUTING_VERSION=3.8.0
- ENV PGROUTING_SHA256=b8a5f0472934fdf7cda3fb4754d01945378d920cdaddc01f378617ddbb9c447f
+ ARG PGROUTING_VERSION=3.8.0
+ ARG PGROUTING_SHA256=b8a5f0472934fdf7cda3fb4754d01945378d920cdaddc01f378617ddbb9c447f
+ ENV PGROUTING_VERSION=$PGROUTING_VERSION

8-50: Consolidate and harden apt steps in one layer
Multiple apt update/install/purge calls inflate layers and cache. Adopt a single RUN using apt-get, --no-install-recommends, DEBIAN_FRONTEND=noninteractive, and cleanup in place. Example diff:

 RUN set -ex \
- && apt update \
- && apt install -y \
+ && apt-get update \
+ && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
        libboost-atomic1.74.0 \
        libboost-chrono1.74.0 \
        libboost-graph1.74.0 \
        libboost-date-time1.74.0 \
        libboost-program-options1.74.0 \
        libboost-system1.74.0 \
        libboost-thread1.74.0 \
        build-essential \
        cmake \
        wget \
        libboost-graph-dev \
        libpq-dev \
        postgresql-server-dev-${PG_MAJOR} \
- && apt install -y \
-        build-essential \
-        cmake \
-        wget \
-        libboost-graph-dev \
-        libpq-dev \
-        postgresql-server-dev-${PG_MAJOR} \
+ && wget -O pgrouting.tar.gz "https://github.com/pgRouting/pgrouting/archive/v${PGROUTING_VERSION}.tar.gz" \
+ && echo "$PGROUTING_SHA256 *pgrouting.tar.gz" | sha256sum -c - \
+ && mkdir -p /usr/src/pgrouting \
+ && tar -xzf pgrouting.tar.gz --strip-components=1 -C /usr/src/pgrouting \
+ && rm pgrouting.tar.gz \
+ && cd /usr/src/pgrouting && mkdir build && cd build && cmake .. && make && make install \
+ && cd / && rm -rf /usr/src/pgrouting \
+ && apt-mark manual postgresql-${PG_MAJOR} \
+ && DEBIAN_FRONTEND=noninteractive apt-get purge -y --auto-remove \
        build-essential \
        cmake \
        wget \
        libpq-dev \
        libboost-graph-dev \
        postgresql-server-dev-${PG_MAJOR} \
+ && rm -rf /var/lib/apt/lists/*

This reduces image size and speeds up builds.

13-3.5-3.8/extra/Dockerfile (4)

1-4: Use build-time args for Osm2pgrouting version
Switch ENV OSM2PGROUTING_VERSION to an ARG to allow version overrides at build time, then conditionally export it if needed at runtime.


5-18: Combine apt steps and pin installs
Unify apt update and both apt install calls into one DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends … step, followed by a single cleanup of /var/lib/apt/lists/*.


19-34: Streamline source extraction & build
Use tar -xzf with --strip-components=1 to extract directly into a dedicated build folder, then build in one go. Optionally move heavy build deps to a multi-stage build to shrink the final image.


35-46: Merge purge and cleanup into same layer
Current separate apt purge, apt autoremove, and rm -rf create extra layers. Combine these into the single RUN for a leaner final image.

14-3.5-3.8/Dockerfile (1)

8-50: Single-layer apt workflow
Consolidate update/install/build/purge in one RUN with apt-get, --no-install-recommends, and cleanup, mirroring the pattern in the 16-3.5 Dockerfile.

16-3.5-3.8/extra/Dockerfile (3)

18-33: Leverage WORKDIR and add ldconfig post-install.
Instead of chaining cd, set a working directory to simplify path management:

WORKDIR /usr/local/src

RUN wget https://github.com/pgRouting/osm2pgrouting/archive/v${OSM2PGROUTING_VERSION}.tar.gz \
 && tar xvf v${OSM2PGROUTING_VERSION}.tar.gz \
 && mkdir -p osm2pgrouting-${OSM2PGROUTING_VERSION}/build \
 && cd osm2pgrouting-${OSM2PGROUTING_VERSION}/build \
 && cmake .. \
 && make \
 && make install \
 && mkdir -p ../tools/osmium/build \
 && cd ../tools/osmium/build \
 && cmake .. \
 && make \
 && make install \
 && ldconfig

This improves readability and ensures any newly installed shared libraries are registered.


34-35: Target the cleanup of the source directory.
Rather than rm -rf ./*, narrow it down to just the extracted source:

- && rm -rf ./* \
+ && rm -rf osm2pgrouting-${OSM2PGROUTING_VERSION} \

This guards against unintended deletions if other artifacts are added later.


36-45: Streamline the purge and cleanup steps.
Consider using apt-get purge --auto-remove, followed by apt-get clean, to remove build-time packages and caches consistently:

- && apt purge -y --autoremove \
-        build-essential \
-        cmake \
-        wget \
-        libboost-program-options-dev \
-        libexpat-dev \
-        libosmium2-dev \
-        libpqxx-dev \
-        zlib1g-dev \
- && apt autoremove -y \
- && rm -rf /var/lib/apt/lists/*
+ && apt-get purge -y --auto-remove \
+       build-essential \
+       cmake \
+       wget \
+       libboost-program-options-dev \
+       libexpat-dev \
+       libosmium2-dev \
+       libpqxx-dev \
+       zlib1g-dev \
+ && apt-get clean \
+ && rm -rf /var/lib/apt/lists/*

This aligns with Debian best practices and avoids residual caches.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d866635 and 9f90d80.

📒 Files selected for processing (26)
  • 13-3.5-3.8/Dockerfile (1 hunks)
  • 13-3.5-3.8/README.md (1 hunks)
  • 13-3.5-3.8/docker-compose.yml (1 hunks)
  • 13-3.5-3.8/extra/Dockerfile (1 hunks)
  • 13-3.5-3.8/version.txt (1 hunks)
  • 14-3.5-3.8/Dockerfile (1 hunks)
  • 14-3.5-3.8/README.md (1 hunks)
  • 14-3.5-3.8/docker-compose.yml (1 hunks)
  • 14-3.5-3.8/extra/Dockerfile (1 hunks)
  • 14-3.5-3.8/version.txt (1 hunks)
  • 15-3.5-3.8/Dockerfile (1 hunks)
  • 15-3.5-3.8/README.md (1 hunks)
  • 15-3.5-3.8/docker-compose.yml (1 hunks)
  • 15-3.5-3.8/extra/Dockerfile (1 hunks)
  • 15-3.5-3.8/version.txt (1 hunks)
  • 16-3.5-3.8/Dockerfile (1 hunks)
  • 16-3.5-3.8/README.md (1 hunks)
  • 16-3.5-3.8/docker-compose.yml (1 hunks)
  • 16-3.5-3.8/extra/Dockerfile (1 hunks)
  • 16-3.5-3.8/version.txt (1 hunks)
  • 17-3.5-3.8/Dockerfile (1 hunks)
  • 17-3.5-3.8/README.md (1 hunks)
  • 17-3.5-3.8/docker-compose.yml (1 hunks)
  • 17-3.5-3.8/extra/Dockerfile (1 hunks)
  • 17-3.5-3.8/version.txt (1 hunks)
  • README.md (2 hunks)
🔇 Additional comments (23)
13-3.5-3.8/version.txt (1)

1-1: Version string matches directory and release.
The content 13-3.5-3.8.0 correctly reflects Postgres 13, PostGIS 3.5, and pgRouting 3.8.0.

14-3.5-3.8/version.txt (1)

1-1: Version string matches directory and release.
The content 14-3.5-3.8.0 correctly reflects Postgres 14, PostGIS 3.5, and pgRouting 3.8.0.

15-3.5-3.8/version.txt (1)

1-1: Version string matches directory and release.
The content 15-3.5-3.8.0 correctly reflects Postgres 15, PostGIS 3.5, and pgRouting 3.8.0.

16-3.5-3.8/version.txt (1)

1-1: Version string matches directory and release.
The content 16-3.5-3.8.0 correctly reflects Postgres 16, PostGIS 3.5, and pgRouting 3.8.0.

17-3.5-3.8/version.txt (1)

1-1: Version string matches directory and release.
The content 17-3.5-3.8.0 correctly reflects Postgres 17, PostGIS 3.5, and pgRouting 3.8.0.

README.md (1)

3-4: Verify badge configuration and branch name.

The GitHub Actions badge references branch=master and a workflow file named main.yml. Please confirm:

  1. That your default branch is really master (not main).
  2. That the workflow filename is indeed main.yml.
    If either is different, update the badge URL to point to the correct branch and file.
15-3.5-3.8/docker-compose.yml (2)

1-3: Service definition and image tag look correct.
The pgrouting service is properly configured to use pgrouting/pgrouting:15-3.5-3.8.0, matching the intended pgRouting/PostGIS version pairing.


6-7: Volume configuration is properly declared.
The db-data volume is both mounted under /var/lib/postgresql/data and declared at the bottom—this ensures persistent storage across container restarts.

Also applies to: 10-11

15-3.5-3.8/extra/Dockerfile (1)

1-4: Base image and version pinning look good.
Using FROM pgrouting/pgrouting:15-3.5-3.8.0 and setting OSM2PGROUTING_VERSION=2.3.8 ensures reproducible builds.

17-3.5-3.8/extra/Dockerfile (1)

1-4: Base image and environment are correct.
Selecting FROM pgrouting/pgrouting:17-3.5-3.8.0 and setting OSM2PGROUTING_VERSION=2.3.8 aligns with the other version directories.

15-3.5-3.8/Dockerfile (5)

1-7: Metadata and version pins are properly set.
LABEL maintainer, PGROUTING_VERSION, and PGROUTING_SHA256 ensure clear ownership and build reproducibility.


18-27: Checksum verification is implemented correctly.
You validate pgrouting.tar.gz against the SHA256 sum before extracting—this is best practice for supply-chain security.


28-42: Build and install steps are clear and correct.
CMake build invocation, installation, and cleanup of /usr/src/pgrouting follow the expected pattern.


43-51: Cleanup of build dependencies and apt lists is thorough.
Using apt purge --autoremove followed by removal of /var/lib/apt/lists yields a minimal final image.


51-52: Removal of default PostGIS init script is intentional.
Stripping out 10_postgis.sh prevents duplicate PostGIS installation during container startup.

13-3.5-3.8/Dockerfile (5)

1-7: Base image, labels, and versioning are correctly applied.
FROM postgis/postgis:13-3.5 along with PGROUTING_VERSION and checksum ENV vars match the pattern established for other PostGIS versions.


26-33: Archive extraction and directory structuring are correct.
The tar --strip-components 1 usage ensures sources land under /usr/src/pgrouting cleanly.


34-42: Build and installation steps are consistent.
CMake, make, and post-install cleanup follow the same reliable pattern as other version Dockerfiles.


43-51: Build dependency purge and apt list cleanup are implemented properly.
Using apt purge -y --autoremove followed by removing /var/lib/apt/lists ensures a lean image.


52-52: PostGIS init script removal is applied.
Stripping 10_postgis.sh aligns with the approach in other Dockerfiles.

16-3.5-3.8/Dockerfile (2)

1-4: Verify PG_MAJOR availability and enrich labels
The base postgis/postgis:16-3.5 image should define PG_MAJOR. Please confirm it’s exported as expected. Consider adding standardized metadata labels (e.g., VCS URL, image version) for better traceability.


51-52: Document removal of default PostGIS init script
Deleting /docker-entrypoint-initdb.d/10_postgis.sh prevents automatic PostGIS setup. Ensure this is intentional and won’t break downstream workflows—consider a comment explaining the rationale.

16-3.5-3.8/extra/Dockerfile (1)

1-2:

Details

❓ Verification inconclusive

Verify the base image tag on Docker Hub.
Please confirm that pgrouting/pgrouting:16-3.5-3.8.0 is published and matches the naming scheme used in sibling directories (e.g., 13-3.5-3.8.0, 14-3.5-3.8.0, etc.).


🏁 Script executed:

#!/bin/bash
# Check for the existence of the tag on Docker Hub
curl -s "https://registry.hub.docker.com/v2/repositories/pgrouting/pgrouting/tags?page_size=100" \
  | jq '.results[] | select(.name=="16-3.5-3.8.0")'

Length of output: 148


Please verify the pgrouting/pgrouting:16-3.5-3.8.0 tag on Docker Hub

  • File: 16-3.5-3.8/extra/Dockerfile (lines 1–2)
  • Snippet:
    FROM pgrouting/pgrouting:16-3.5-3.8.0

I queried the Docker Hub tags API (first 100 results) and didn’t see 16-3.5-3.8.0. Please confirm that this tag is published and follows the same naming scheme as 13-3.5-3.8.0, 14-3.5-3.8.0, etc. You may need to increase page_size in your API request or check the Docker Hub UI directly.

Copy link
Contributor

@iosefa iosefa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, @sanak! from what I can see it looks good

@sanak
Copy link
Member Author

sanak commented May 10, 2025

@iosefa Okay, thanks for confirmation!
I will merge this.

@sanak sanak merged commit 937b057 into master May 10, 2025
40 of 41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants