Skip to content

Commit 63b521e

Browse files
committed
refactor: use per-variant pkg_name instead of PYTHON_VERSION arg
this allows for dbuild to determine package for daemonless.io/status
1 parent b57d81e commit 63b521e

4 files changed

Lines changed: 30 additions & 31 deletions

File tree

‎.daemonless/config.yaml‎

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,59 +4,58 @@ build:
44
pkg_name: python3
55
containerfile: Containerfile
66
args:
7-
BASE_VERSION: "15-pkg-latest"
8-
PYTHON_VERSION: "3"
7+
BASE_VERSION: "15.1-pkg-latest"
98
aliases: ["3"]
109
- tag: 2-pkg-latest
10+
pkg_name: python2
1111
containerfile: Containerfile
1212
args:
13-
BASE_VERSION: "15-pkg-latest"
14-
PYTHON_VERSION: "2"
13+
BASE_VERSION: "15.1-pkg-latest"
1514
aliases: ["2"]
1615
- tag: 27-pkg-latest
16+
pkg_name: python27
1717
containerfile: Containerfile
1818
args:
19-
BASE_VERSION: "15-pkg-latest"
20-
PYTHON_VERSION: "27"
19+
BASE_VERSION: "15.1-pkg-latest"
2120
- tag: 310-pkg-latest
21+
pkg_name: python310
2222
containerfile: Containerfile
2323
args:
24-
BASE_VERSION: "15-pkg-latest"
25-
PYTHON_VERSION: "310"
24+
BASE_VERSION: "15.1-pkg-latest"
2625
- tag: 311-pkg-latest
26+
pkg_name: python311
2727
containerfile: Containerfile
2828
args:
29-
BASE_VERSION: "15-pkg-latest"
30-
PYTHON_VERSION: "311"
29+
BASE_VERSION: "15.1-pkg-latest"
3130
- tag: 312-pkg-latest
31+
pkg_name: python312
3232
containerfile: Containerfile
3333
args:
34-
BASE_VERSION: "15-pkg-latest"
35-
PYTHON_VERSION: "312"
34+
BASE_VERSION: "15.1-pkg-latest"
3635
aliases: ["pkg", "pkg-latest"]
3736
- tag: 313-pkg-latest
37+
pkg_name: python313
3838
containerfile: Containerfile
3939
args:
40-
BASE_VERSION: "15-pkg-latest"
41-
PYTHON_VERSION: "313"
40+
BASE_VERSION: "15.1-pkg-latest"
4241
- tag: 313t-pkg-latest
42+
pkg_name: python313t
4343
containerfile: Containerfile
4444
args:
45-
BASE_VERSION: "15-pkg-latest"
46-
PYTHON_VERSION: "313t"
45+
BASE_VERSION: "15.1-pkg-latest"
4746
- tag: 314-pkg-latest
47+
pkg_name: python314
4848
containerfile: Containerfile
4949
args:
50-
BASE_VERSION: "15-pkg-latest"
51-
PYTHON_VERSION: "314"
50+
BASE_VERSION: "15.1-pkg-latest"
5251
aliases: ["latest"]
5352
- tag: 314t-pkg-latest
53+
pkg_name: python314t
5454
containerfile: Containerfile
5555
args:
56-
BASE_VERSION: "15-pkg-latest"
57-
PYTHON_VERSION: "314t"
56+
BASE_VERSION: "15.1-pkg-latest"
5857
- tag: 315-pkg-latest
58+
pkg_name: python315
5959
containerfile: Containerfile
6060
args:
61-
BASE_VERSION: '15-pkg-latest'
62-
PYTHON_VERSION: '315'
61+
BASE_VERSION: "15.1-pkg-latest"

‎Containerfile‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
# Source: Containerfile.j2
55
# --------------------------------------------------------------------------
66

7-
ARG BASE_VERSION=15
7+
ARG BASE_VERSION=15.1-pkg-latest
88
FROM ghcr.io/daemonless/base-core:${BASE_VERSION}
99

10-
ARG PYTHON_VERSION
10+
ARG PKG_NAME
1111
ARG FREEBSD_ARCH=amd64
1212

1313
LABEL org.opencontainers.image.title="Python" \
@@ -22,8 +22,8 @@ LABEL org.opencontainers.image.title="Python" \
2222

2323
# Install dependencies
2424
RUN pkg update && \
25-
pkg install -y python${PYTHON_VERSION} && \
25+
pkg install -y ${PKG_NAME} && \
2626
mkdir -p /app && \
27-
pkg query %v python${PYTHON_VERSION} > /app/version && \
27+
pkg query %v ${PKG_NAME} > /app/version && \
2828
pkg clean -ay && \
2929
rm -rf /var/cache/pkg/* /var/db/pkg/repos/*

‎Containerfile.j2‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
ARG BASE_VERSION=15
1+
ARG BASE_VERSION=15.1-pkg-latest
22
FROM ghcr.io/daemonless/base-core:${BASE_VERSION}
33

4-
ARG PYTHON_VERSION
4+
ARG PKG_NAME
55
ARG FREEBSD_ARCH=amd64
66

77
LABEL org.opencontainers.image.title="Python" \
@@ -16,8 +16,8 @@ LABEL org.opencontainers.image.title="Python" \
1616

1717
# Install dependencies
1818
RUN pkg update && \
19-
pkg install -y python${PYTHON_VERSION} && \
19+
pkg install -y ${PKG_NAME} && \
2020
mkdir -p /app && \
21-
pkg query %v python${PYTHON_VERSION} > /app/version && \
21+
pkg query %v ${PKG_NAME} > /app/version && \
2222
pkg clean -ay && \
2323
rm -rf /var/cache/pkg/* /var/db/pkg/repos/*

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Python is an interpreted object-oriented programming language, and is often comp
3333

3434
**Architectures:** amd64
3535
**User:** `root` (UID/GID via PUID/PGID, defaults to 1000:1000)
36-
**Base:** FreeBSD 15
36+
**Base:** FreeBSD 15.1-pkg-latest
3737

3838
---
3939

0 commit comments

Comments
 (0)