# Minimal repology-updater environment for package index generation. # Fetches only the repos we care about, not the full production set. # # Build (with GitHub token for authenticated clones): # podman build --secret id=github_token,env=GITHUB_TOKEN \ # -t repology-updater -f generator/Containerfile generator/ # # Run (fetches repos, auto-inits on first run): # podman run --rm -v repology-state:/state -v repology-parsed:/parsed \ # -v repology-pgdata:/var/lib/pgsql/data repology-updater \ # --fetch --fetch --parse --database # # Extract data: # podman run --rm -v repology-state:/state -v repology-parsed:/parsed \ # -v repology-pgdata:/var/lib/pgsql/data repology-updater --extract FROM registry.fedoraproject.org/fedora:latest # PostgreSQL 18, Python 3.14, libversion build deps RUN dnf install -y --setopt=install_weak_deps=False \ postgresql-server \ postgresql-server-devel \ postgresql-contrib \ python3 \ python3-pip \ python3-devel \ gcc \ gcc-c++ \ redhat-rpm-config \ cmake \ pkg-config \ git \ rsync \ rpm2cpio \ cpio \ yajl-devel \ libxml2-devel \ libxslt-devel \ python3-rpm \ && dnf clean all # Configure git to use GitHub token when available (via build secret). # The credential helper writes the token into the extraheader so all # github.com clones are authenticated, avoiding rate limits. RUN --mount=type=secret,id=github_token \ if [ -f /run/secrets/github_token ] && [ -s /run/secrets/github_token ]; then \ TOKEN=$(cat /run/secrets/github_token) \ && git config --global url."https://${TOKEN}@github.com/".insteadOf "https://github.com/" ; \ fi # Build and install libversion + pg extension RUN git clone --depth 1 https://github.com/repology/libversion.git /tmp/libversion \ && cd /tmp/libversion \ && cmake -DCMAKE_INSTALL_PREFIX=/usr . \ && make -j"$(nproc)" \ && make install \ && ldconfig \ && rm -rf /tmp/libversion RUN git clone --depth 1 https://github.com/repology/postgresql-libversion.git /tmp/pg-libversion \ && cd /tmp/pg-libversion \ && make -j"$(nproc)" \ && make install \ && rm -rf /tmp/pg-libversion # Clone repology-updater and rules WORKDIR /repology RUN git clone --depth 1 https://github.com/repology/repology-updater.git . \ && git clone --depth 1 https://github.com/repology/repology-rules.git rules.d # Remove the credential helper so the token is not baked into the image RUN git config --global --unset-all url."https://github.com/".insteadOf 2>/dev/null || true # Python dependencies RUN pip install --no-cache-dir --break-system-packages -r requirements.txt # Custom config scoped to our target repos COPY repology.conf /repology/repology.conf # Extraction SQL COPY extract.sql /repology/extract.sql # Entrypoint script COPY entrypoint.sh /repology/entrypoint.sh RUN chmod +x /repology/entrypoint.sh # Persistent volumes for incremental updates VOLUME ["/state", "/parsed"] ENTRYPOINT ["/repology/entrypoint.sh"]