Migrate devpi to Dagger build and bump to 6.19.3
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) <noreply@anthropic.com>
This commit is contained in:
parent
fe0e913963
commit
37b8a21524
4 changed files with 59 additions and 35 deletions
|
|
@ -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"]
|
||||
56
containers/devpi/container.py
Normal file
56
containers/devpi/container.py
Normal file
|
|
@ -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,
|
||||
)
|
||||
1
docs/changelog.d/+devpi-dagger-migration.infra.md
Normal file
1
docs/changelog.d/+devpi-dagger-migration.infra.md
Normal file
|
|
@ -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.
|
||||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue