From 37b8a21524b6902bcdc5e641085e37964fade47e Mon Sep 17 00:00:00 2001 From: Erich Blume Date: Sat, 18 Apr 2026 07:57:05 -0700 Subject: [PATCH] Migrate devpi to Dagger build and bump to 6.19.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace Dockerfile with container.py for native Dagger builds. Bump devpi-server 6.19.1→6.19.3, devpi-web 5.0.1→5.0.2. Co-Authored-By: Claude Opus 4.6 (1M context) --- containers/devpi/Dockerfile | 33 ----------- containers/devpi/container.py | 56 +++++++++++++++++++ .../+devpi-dagger-migration.infra.md | 1 + service-versions.yaml | 4 +- 4 files changed, 59 insertions(+), 35 deletions(-) delete mode 100644 containers/devpi/Dockerfile create mode 100644 containers/devpi/container.py create mode 100644 docs/changelog.d/+devpi-dagger-migration.infra.md diff --git a/containers/devpi/Dockerfile b/containers/devpi/Dockerfile deleted file mode 100644 index 69e14c3..0000000 --- a/containers/devpi/Dockerfile +++ /dev/null @@ -1,33 +0,0 @@ -ARG CONTAINER_APP_VERSION=6.19.1 - -FROM python:3.12-slim - -ARG CONTAINER_APP_VERSION -ARG DEVPI_SERVER_VERSION=${CONTAINER_APP_VERSION} - -LABEL org.opencontainers.image.title="devpi" -LABEL org.opencontainers.image.description="devpi PyPI server and caching proxy" -LABEL org.opencontainers.image.version="${CONTAINER_APP_VERSION}" -LABEL org.opencontainers.image.source="https://forge.eblu.me/eblume/blumeops" -LABEL org.opencontainers.image.vendor="blumeops" -ARG DEVPI_WEB_VERSION=5.0.1 - -# Install devpi-server and devpi-web -RUN pip install --no-cache-dir \ - devpi-server==${DEVPI_SERVER_VERSION} \ - devpi-web==${DEVPI_WEB_VERSION} - -# Create non-root user -RUN useradd -r -u 1000 devpi && mkdir -p /devpi && chown devpi:devpi /devpi - -# Add startup script -COPY --chown=devpi:devpi start.sh /usr/local/bin/start.sh -RUN chmod +x /usr/local/bin/start.sh - -USER devpi -WORKDIR /devpi - -# Expose default port -EXPOSE 3141 - -ENTRYPOINT ["/usr/local/bin/start.sh"] diff --git a/containers/devpi/container.py b/containers/devpi/container.py new file mode 100644 index 0000000..0067e95 --- /dev/null +++ b/containers/devpi/container.py @@ -0,0 +1,56 @@ +"""devpi PyPI server and caching proxy — native Dagger build. + +Single-stage build: install devpi-server and devpi-web into a Python slim image. +""" + +import dagger +from dagger import dag + +from blumeops.containers import oci_labels + +VERSION = "6.19.3" + +DEVPI_WEB_VERSION = "5.0.2" +PYTHON_BASE = "python:3.12-slim" + + +async def build(src: dagger.Directory) -> dagger.Container: + ctr = ( + dag.container() + .from_(PYTHON_BASE) + .with_exec( + [ + "pip", + "install", + "--no-cache-dir", + f"devpi-server=={VERSION}", + f"devpi-web=={DEVPI_WEB_VERSION}", + ] + ) + .with_exec( + [ + "useradd", + "-r", + "-u", + "1000", + "devpi", + ] + ) + .with_exec(["mkdir", "-p", "/devpi"]) + .with_exec(["chown", "devpi:devpi", "/devpi"]) + .with_file( + "/usr/local/bin/start.sh", + src.file("containers/devpi/start.sh"), + ) + .with_exec(["chmod", "+x", "/usr/local/bin/start.sh"]) + .with_user("devpi") + .with_workdir("/devpi") + .with_exposed_port(3141) + .with_entrypoint(["/usr/local/bin/start.sh"]) + ) + return oci_labels( + ctr, + title="devpi", + description="devpi PyPI server and caching proxy", + version=VERSION, + ) diff --git a/docs/changelog.d/+devpi-dagger-migration.infra.md b/docs/changelog.d/+devpi-dagger-migration.infra.md new file mode 100644 index 0000000..6c5f226 --- /dev/null +++ b/docs/changelog.d/+devpi-dagger-migration.infra.md @@ -0,0 +1 @@ +Migrate devpi container from Dockerfile to native Dagger build; bump devpi-server 6.19.1→6.19.3 and devpi-web 5.0.1→5.0.2. diff --git a/service-versions.yaml b/service-versions.yaml index 6d5226f..761aa8d 100644 --- a/service-versions.yaml +++ b/service-versions.yaml @@ -215,8 +215,8 @@ services: - name: devpi type: argocd - last-reviewed: 2026-03-06 - current-version: "6.19.1" + last-reviewed: 2026-04-18 + current-version: "6.19.3" upstream-source: https://github.com/devpi/devpi/releases - name: cv