From 63b521ed72b1472ed98e90d7ed48c97dbd288bb1 Mon Sep 17 00:00:00 2001 From: Michael Johnson Date: Sat, 27 Jun 2026 16:58:04 -0400 Subject: [PATCH] refactor: use per-variant pkg_name instead of PYTHON_VERSION arg this allows for dbuild to determine package for daemonless.io/status --- .daemonless/config.yaml | 43 ++++++++++++++++++++--------------------- Containerfile | 8 ++++---- Containerfile.j2 | 8 ++++---- README.md | 2 +- 4 files changed, 30 insertions(+), 31 deletions(-) diff --git a/.daemonless/config.yaml b/.daemonless/config.yaml index aa8e57c..1db7fbd 100644 --- a/.daemonless/config.yaml +++ b/.daemonless/config.yaml @@ -4,59 +4,58 @@ build: pkg_name: python3 containerfile: Containerfile args: - BASE_VERSION: "15-pkg-latest" - PYTHON_VERSION: "3" + BASE_VERSION: "15.1-pkg-latest" aliases: ["3"] - tag: 2-pkg-latest + pkg_name: python2 containerfile: Containerfile args: - BASE_VERSION: "15-pkg-latest" - PYTHON_VERSION: "2" + BASE_VERSION: "15.1-pkg-latest" aliases: ["2"] - tag: 27-pkg-latest + pkg_name: python27 containerfile: Containerfile args: - BASE_VERSION: "15-pkg-latest" - PYTHON_VERSION: "27" + BASE_VERSION: "15.1-pkg-latest" - tag: 310-pkg-latest + pkg_name: python310 containerfile: Containerfile args: - BASE_VERSION: "15-pkg-latest" - PYTHON_VERSION: "310" + BASE_VERSION: "15.1-pkg-latest" - tag: 311-pkg-latest + pkg_name: python311 containerfile: Containerfile args: - BASE_VERSION: "15-pkg-latest" - PYTHON_VERSION: "311" + BASE_VERSION: "15.1-pkg-latest" - tag: 312-pkg-latest + pkg_name: python312 containerfile: Containerfile args: - BASE_VERSION: "15-pkg-latest" - PYTHON_VERSION: "312" + BASE_VERSION: "15.1-pkg-latest" aliases: ["pkg", "pkg-latest"] - tag: 313-pkg-latest + pkg_name: python313 containerfile: Containerfile args: - BASE_VERSION: "15-pkg-latest" - PYTHON_VERSION: "313" + BASE_VERSION: "15.1-pkg-latest" - tag: 313t-pkg-latest + pkg_name: python313t containerfile: Containerfile args: - BASE_VERSION: "15-pkg-latest" - PYTHON_VERSION: "313t" + BASE_VERSION: "15.1-pkg-latest" - tag: 314-pkg-latest + pkg_name: python314 containerfile: Containerfile args: - BASE_VERSION: "15-pkg-latest" - PYTHON_VERSION: "314" + BASE_VERSION: "15.1-pkg-latest" aliases: ["latest"] - tag: 314t-pkg-latest + pkg_name: python314t containerfile: Containerfile args: - BASE_VERSION: "15-pkg-latest" - PYTHON_VERSION: "314t" + BASE_VERSION: "15.1-pkg-latest" - tag: 315-pkg-latest + pkg_name: python315 containerfile: Containerfile args: - BASE_VERSION: '15-pkg-latest' - PYTHON_VERSION: '315' + BASE_VERSION: "15.1-pkg-latest" diff --git a/Containerfile b/Containerfile index 29d9cee..6a51409 100644 --- a/Containerfile +++ b/Containerfile @@ -4,10 +4,10 @@ # Source: Containerfile.j2 # -------------------------------------------------------------------------- -ARG BASE_VERSION=15 +ARG BASE_VERSION=15.1-pkg-latest FROM ghcr.io/daemonless/base-core:${BASE_VERSION} -ARG PYTHON_VERSION +ARG PKG_NAME ARG FREEBSD_ARCH=amd64 LABEL org.opencontainers.image.title="Python" \ @@ -22,8 +22,8 @@ LABEL org.opencontainers.image.title="Python" \ # Install dependencies RUN pkg update && \ - pkg install -y python${PYTHON_VERSION} && \ + pkg install -y ${PKG_NAME} && \ mkdir -p /app && \ - pkg query %v python${PYTHON_VERSION} > /app/version && \ + pkg query %v ${PKG_NAME} > /app/version && \ pkg clean -ay && \ rm -rf /var/cache/pkg/* /var/db/pkg/repos/* \ No newline at end of file diff --git a/Containerfile.j2 b/Containerfile.j2 index 05cb591..3a3f41b 100644 --- a/Containerfile.j2 +++ b/Containerfile.j2 @@ -1,7 +1,7 @@ -ARG BASE_VERSION=15 +ARG BASE_VERSION=15.1-pkg-latest FROM ghcr.io/daemonless/base-core:${BASE_VERSION} -ARG PYTHON_VERSION +ARG PKG_NAME ARG FREEBSD_ARCH=amd64 LABEL org.opencontainers.image.title="Python" \ @@ -16,8 +16,8 @@ LABEL org.opencontainers.image.title="Python" \ # Install dependencies RUN pkg update && \ - pkg install -y python${PYTHON_VERSION} && \ + pkg install -y ${PKG_NAME} && \ mkdir -p /app && \ - pkg query %v python${PYTHON_VERSION} > /app/version && \ + pkg query %v ${PKG_NAME} > /app/version && \ pkg clean -ay && \ rm -rf /var/cache/pkg/* /var/db/pkg/repos/* diff --git a/README.md b/README.md index 29a9e80..5fa45a7 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ Python is an interpreted object-oriented programming language, and is often comp **Architectures:** amd64 **User:** `root` (UID/GID via PUID/PGID, defaults to 1000:1000) -**Base:** FreeBSD 15 +**Base:** FreeBSD 15.1-pkg-latest ---