Skip to content

Commit 2bfee0f

Browse files
committed
Convert to OCI image
1 parent 6d6b1a5 commit 2bfee0f

File tree

14 files changed

+299
-182
lines changed

14 files changed

+299
-182
lines changed

.daemonless/config.yaml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
build:
2+
variants:
3+
- tag: 15.0
4+
containerfile: Containerfile.pkg
5+
aliases: ["latest"]
6+
default: true
7+
args:
8+
FREEBSD_RELEASE: "15.0"
9+
- tag: 15.0-3
10+
containerfile: Containerfile.pkg
11+
args:
12+
FREEBSD_RELEASE: "15.0"
13+
PYTHON_VERSION: "3"
14+
- tag: 15.0-2
15+
containerfile: Containerfile.pkg
16+
args:
17+
FREEBSD_RELEASE: "15.0"
18+
PYTHON_VERSION: "2"
19+
- tag: 15.0-27
20+
containerfile: Containerfile.pkg
21+
args:
22+
FREEBSD_RELEASE: "15.0"
23+
PYTHON_VERSION: "27"
24+
- tag: 15.0-310
25+
containerfile: Containerfile.pkg
26+
args:
27+
FREEBSD_RELEASE: "15.0"
28+
PYTHON_VERSION: "310"
29+
- tag: 15.0-311
30+
containerfile: Containerfile.pkg
31+
args:
32+
FREEBSD_RELEASE: "15.0"
33+
PYTHON_VERSION: "311"
34+
- tag: 15.0-312
35+
containerfile: Containerfile.pkg
36+
args:
37+
FREEBSD_RELEASE: "15.0"
38+
PYTHON_VERSION: "312"
39+
- tag: 15.0-313
40+
containerfile: Containerfile.pkg
41+
args:
42+
FREEBSD_RELEASE: "15.0"
43+
PYTHON_VERSION: "313"
44+
- tag: 15.0-313t
45+
containerfile: Containerfile.pkg
46+
args:
47+
FREEBSD_RELEASE: "15.0"
48+
PYTHON_VERSION: "313t"
49+
- tag: 15.0-314
50+
containerfile: Containerfile.pkg
51+
args:
52+
FREEBSD_RELEASE: "15.0"
53+
PYTHON_VERSION: "314"

.github/workflows/build.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Build OCI image for python
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 21 * *'
6+
push:
7+
branches: [main]
8+
paths-ignore: ['*.md', 'LICENSE', '.gitignore']
9+
pull_request:
10+
branches: [main]
11+
workflow_dispatch:
12+
13+
jobs:
14+
build:
15+
uses: appjail-makejails/workflows/.github/workflows/daemonless-build.yaml@main
16+
with:
17+
image_name: python
18+
secrets: inherit
19+
workflow-keepalive:
20+
if: github.event_name == 'schedule'
21+
runs-on: ubuntu-latest
22+
permissions:
23+
actions: write
24+
steps:
25+
- uses: liskin/gh-workflow-keepalive@v1

Containerfile.pkg

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
ARG FREEBSD_RELEASE
2+
ARG PYTHON_VERSION
3+
4+
FROM ghcr.io/appjail-makejails/base:${FREEBSD_RELEASE}
5+
6+
LABEL org.opencontainers.image.title="Python" \
7+
org.opencontainers.image.description="Python is an interpreted, interactive, object-oriented, open-source programming language" \
8+
org.opencontainers.image.source="https://github.com/AppJail-makejails/python" \
9+
org.opencontainers.image.url="https://github.com/AppJail-makejails/python" \
10+
org.opencontainers.image.vendor="DtxdF" \
11+
org.opencontainers.image.authors="Jesús Daniel Colmenares Oviedo <dtxdf@disroot.org>"
12+
13+
RUN pkg update && \
14+
pkg install python${PYTHON_VERSION} && \
15+
pkg clean -a && \
16+
rm -rf /var/cache/pkg/* /var/db/pkg/repos/*

Makejail

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
INCLUDE options/options.makejail
1+
ARG python_from=ghcr.io/appjail-makejails/python
2+
ARG python_tag=latest
23

3-
ARG python_tag=14.3
4-
ARG python_ajspec=gh+AppJail-makejails/python
5-
6-
FROM --entrypoint "${python_ajspec}" python:${python_tag}
4+
OPTION start
5+
OPTION overwrite=force
6+
OPTION from=${python_from}:${python_tag}

README.md

Lines changed: 69 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -2,74 +2,80 @@
22

33
Python is an interpreted, interactive, object-oriented, open-source programming language. It incorporates modules, exceptions, dynamic typing, very high level dynamic data types, and classes. Python combines remarkable power with very clear syntax. It has interfaces to many system calls and libraries, as well as to various window systems, and is extensible in C or C++. It is also usable as an extension language for applications that need a programmable interface. Finally, Python is portable: it runs on many Unix variants, on the Mac, and on Windows 2000 and later.
44

5-
wikipedia.org/wiki/Python_(programming\_language)
5+
wikipedia.org/wiki/Python_(programming_language)
66

7-
![python logo](https://upload.wikimedia.org/wikipedia/commons/thumb/c/c3/Python-logo-notext.svg/121px-Python-logo-notext.svg.png)
7+
![python logo](https://upload.wikimedia.org/wikipedia/commons/thumb/c/c3/Python-logo-notext.svg/960px-Python-logo-notext.svg.png)
88

99
## How to use this Makejail
1010

11-
Create a `Makejail` in your Python app project.
12-
13-
```
14-
OPTION start
15-
OPTION overwrite
16-
17-
INCLUDE options/network.makejail
18-
19-
FROM python:14.3
20-
21-
WORKDIR /app
22-
COPY .
23-
24-
STAGE cmd
25-
26-
CMD cd /app; python main.py
27-
```
28-
29-
**Note**: Remember that you can use `INCLUDE gh+AppJail-makejails/python` instead of `FROM python:...` to use arguments, but when using a specific version of python, you need to change the entry point when running a python script.
30-
31-
Where `options/network.makejail` are the options that suit your environment, for example:
32-
33-
```
34-
ARG network?
35-
ARG interface=pyapp
36-
37-
OPTION virtualnet=${network}:${interface} default
38-
OPTION nat
39-
```
40-
41-
Open a shell and run `appjail makejail`:
42-
43-
```sh
44-
appjail makejail -j pyapp
11+
```console
12+
# appjail makejail -j python -f gh+AppJail-makejails/python
13+
...
14+
# appjail cmd jexec python python
15+
Python 3.11.15 (main, Mar 4 2026, 23:52:19) [Clang 19.1.7 (https://github.com/llvm/llvm-project.git llvmorg-19.1.7-0-gcd7080 on freebsd15
16+
Type "help", "copyright", "credits" or "license" for more information.
17+
>>>
4518
```
4619

4720
### Arguments
4821

49-
* `python_tag` (default: `14.3`): see [#tags](#tags).
50-
* `python_ajspec` (default: `gh+AppJail-makejails/python`): Entry point where the `appjail-ajspec(5)` file is located.
51-
52-
## Tags
53-
54-
| Tag | Arch | Version | Type | `python_major` | `python_minor` |
55-
| ------------------------------------ | ------- | ------------------ | ------ | ----------------- | -------------- |
56-
| `14.3` | `amd64` | `14.3-RELEASE` | `thin` | - | - |
57-
| `14.3-3` | `amd64` | `14.3-RELEASE` | `thin` | `3` | - |
58-
| `14.3-314` | `amd64` | `14.3-RELEASE` | `thin` | `3` | `14` |
59-
| `14.3-313t` | `amd64` | `14.3-RELEASE` | `thin` | `3` | `13t` |
60-
| `14.3-313` | `amd64` | `14.3-RELEASE` | `thin` | `3` | `13` |
61-
| `14.3-312` | `amd64` | `14.3-RELEASE` | `thin` | `3` | `13t` |
62-
| `14.3-311` | `amd64` | `14.3-RELEASE` | `thin` | `3` | `11` |
63-
| `14.3-310` | `amd64` | `14.3-RELEASE` | `thin` | `3` | `10` |
64-
| `14.3-2` | `amd64` | `14.3-RELEASE` | `thin` | `2` | - |
65-
| `14.3-27` | `amd64` | `14.3-RELEASE` | `thin` | `2` | `7` |
66-
| `15` | `amd64` | `15` | `thin` | - | - |
67-
| `15-3` | `amd64` | `15` | `thin` | `3` | - |
68-
| `15-314` | `amd64` | `15` | `thin` | `3` | `14` |
69-
| `15-313t` | `amd64` | `15` | `thin` | `3` | `13t` |
70-
| `15-313` | `amd64` | `15` | `thin` | `3` | `13` |
71-
| `15-312` | `amd64` | `15` | `thin` | `3` | `13t` |
72-
| `15-311` | `amd64` | `15` | `thin` | `3` | `11` |
73-
| `15-310` | `amd64` | `15` | `thin` | `3` | `10` |
74-
| `15-2` | `amd64` | `15` | `thin` | `2` | - |
75-
| `15-27` | `amd64` | `15` | `thin` | `2` | `7` |
22+
* `python_from` (default: `ghcr.io/appjail-makejails/python`): Location of OCI image. See also [OCI Configuration](#oci-configuration).
23+
* `python_tag` (default: `latest`): OCI image tag. See also [OCI Configuration](#oci-configuration).
24+
25+
## OCI Configuration
26+
27+
```yaml
28+
build:
29+
variants:
30+
- tag: 15.0
31+
containerfile: Containerfile.pkg
32+
aliases: ["latest"]
33+
default: true
34+
args:
35+
FREEBSD_RELEASE: "15.0"
36+
- tag: 15.0-3
37+
containerfile: Containerfile.pkg
38+
args:
39+
FREEBSD_RELEASE: "15.0"
40+
PYTHON_VERSION: "3"
41+
- tag: 15.0-2
42+
containerfile: Containerfile.pkg
43+
args:
44+
FREEBSD_RELEASE: "15.0"
45+
PYTHON_VERSION: "2"
46+
- tag: 15.0-27
47+
containerfile: Containerfile.pkg
48+
args:
49+
FREEBSD_RELEASE: "15.0"
50+
PYTHON_VERSION: "27"
51+
- tag: 15.0-310
52+
containerfile: Containerfile.pkg
53+
args:
54+
FREEBSD_RELEASE: "15.0"
55+
PYTHON_VERSION: "310"
56+
- tag: 15.0-311
57+
containerfile: Containerfile.pkg
58+
args:
59+
FREEBSD_RELEASE: "15.0"
60+
PYTHON_VERSION: "311"
61+
- tag: 15.0-312
62+
containerfile: Containerfile.pkg
63+
args:
64+
FREEBSD_RELEASE: "15.0"
65+
PYTHON_VERSION: "312"
66+
- tag: 15.0-313
67+
containerfile: Containerfile.pkg
68+
args:
69+
FREEBSD_RELEASE: "15.0"
70+
PYTHON_VERSION: "313"
71+
- tag: 15.0-313t
72+
containerfile: Containerfile.pkg
73+
args:
74+
FREEBSD_RELEASE: "15.0"
75+
PYTHON_VERSION: "313t"
76+
- tag: 15.0-314
77+
containerfile: Containerfile.pkg
78+
args:
79+
FREEBSD_RELEASE: "15.0"
80+
PYTHON_VERSION: "314"
81+
```

build.makejail

Lines changed: 0 additions & 23 deletions
This file was deleted.

options/options.makejail

Lines changed: 0 additions & 4 deletions
This file was deleted.

update/Containerfile.pkg.template

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
ARG FREEBSD_RELEASE
2+
ARG PYTHON_VERSION
3+
4+
FROM ghcr.io/appjail-makejails/base:${FREEBSD_RELEASE}
5+
6+
LABEL org.opencontainers.image.title="Python" \
7+
org.opencontainers.image.description="Python is an interpreted, interactive, object-oriented, open-source programming language" \
8+
org.opencontainers.image.source="https://github.com/AppJail-makejails/python" \
9+
org.opencontainers.image.url="https://github.com/AppJail-makejails/python" \
10+
org.opencontainers.image.vendor="DtxdF" \
11+
org.opencontainers.image.authors="Jesús Daniel Colmenares Oviedo <dtxdf@disroot.org>"
12+
13+
RUN pkg update && \
14+
pkg install python${PYTHON_VERSION} && \
15+
pkg clean -a && \
16+
rm -rf /var/cache/pkg/* /var/db/pkg/repos/*

update/Makejail.template

Lines changed: 0 additions & 6 deletions
This file was deleted.

update/README.md.template

Lines changed: 15 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -2,74 +2,28 @@
22

33
Python is an interpreted, interactive, object-oriented, open-source programming language. It incorporates modules, exceptions, dynamic typing, very high level dynamic data types, and classes. Python combines remarkable power with very clear syntax. It has interfaces to many system calls and libraries, as well as to various window systems, and is extensible in C or C++. It is also usable as an extension language for applications that need a programmable interface. Finally, Python is portable: it runs on many Unix variants, on the Mac, and on Windows 2000 and later.
44

5-
wikipedia.org/wiki/Python_(programming\_language)
5+
wikipedia.org/wiki/Python_(programming_language)
66

7-
![python logo](https://upload.wikimedia.org/wikipedia/commons/thumb/c/c3/Python-logo-notext.svg/121px-Python-logo-notext.svg.png)
7+
![python logo](https://upload.wikimedia.org/wikipedia/commons/thumb/c/c3/Python-logo-notext.svg/960px-Python-logo-notext.svg.png)
88

99
## How to use this Makejail
1010

11-
Create a `Makejail` in your Python app project.
12-
13-
```
14-
OPTION start
15-
OPTION overwrite
16-
17-
INCLUDE options/network.makejail
18-
19-
FROM python:%%TAG1%%
20-
21-
WORKDIR /app
22-
COPY .
23-
24-
STAGE cmd
25-
26-
CMD cd /app; python main.py
27-
```
28-
29-
**Note**: Remember that you can use `INCLUDE gh+AppJail-makejails/python` instead of `FROM python:...` to use arguments, but when using a specific version of python, you need to change the entry point when running a python script.
30-
31-
Where `options/network.makejail` are the options that suit your environment, for example:
32-
33-
```
34-
ARG network?
35-
ARG interface=pyapp
36-
37-
OPTION virtualnet=${network}:${interface} default
38-
OPTION nat
39-
```
40-
41-
Open a shell and run `appjail makejail`:
42-
43-
```sh
44-
appjail makejail -j pyapp
11+
```console
12+
# appjail makejail -j python -f gh+AppJail-makejails/python
13+
...
14+
# appjail cmd jexec python python
15+
Python 3.11.15 (main, Mar 4 2026, 23:52:19) [Clang 19.1.7 (https://github.com/llvm/llvm-project.git llvmorg-19.1.7-0-gcd7080 on freebsd15
16+
Type "help", "copyright", "credits" or "license" for more information.
17+
>>>
4518
```
4619

4720
### Arguments
4821

49-
* `python_tag` (default: `%%TAG1%%`): see [#tags](#tags).
50-
* `python_ajspec` (default: `gh+AppJail-makejails/python`): Entry point where the `appjail-ajspec(5)` file is located.
22+
* `python_from` (default: `ghcr.io/appjail-makejails/%%IMAGE_NAME%%`): Location of OCI image. See also [OCI Configuration](#oci-configuration).
23+
* `python_tag` (default: `latest`): OCI image tag. See also [OCI Configuration](#oci-configuration).
5124

52-
## Tags
25+
## OCI Configuration
5326

54-
| Tag | Arch | Version | Type | `python_major` | `python_minor` |
55-
| ------------------------------------ | ------- | ------------------ | ------ | ----------------- | -------------- |
56-
| `%%TAG1%%` | `amd64` | `%%TAG1%%-RELEASE` | `thin` | - | - |
57-
| `%%TAG1%%-%%PYVER_MAJOR%%` | `amd64` | `%%TAG1%%-RELEASE` | `thin` | `%%PYVER_MAJOR%%` | - |
58-
| `%%TAG1%%-%%PYVER_MAJOR%%%%PYVER6%%` | `amd64` | `%%TAG1%%-RELEASE` | `thin` | `%%PYVER_MAJOR%%` | `%%PYVER6%%` |
59-
| `%%TAG1%%-%%PYVER_MAJOR%%%%PYVER5%%` | `amd64` | `%%TAG1%%-RELEASE` | `thin` | `%%PYVER_MAJOR%%` | `%%PYVER5%%` |
60-
| `%%TAG1%%-%%PYVER_MAJOR%%%%PYVER4%%` | `amd64` | `%%TAG1%%-RELEASE` | `thin` | `%%PYVER_MAJOR%%` | `%%PYVER4%%` |
61-
| `%%TAG1%%-%%PYVER_MAJOR%%%%PYVER3%%` | `amd64` | `%%TAG1%%-RELEASE` | `thin` | `%%PYVER_MAJOR%%` | `%%PYVER5%%` |
62-
| `%%TAG1%%-%%PYVER_MAJOR%%%%PYVER2%%` | `amd64` | `%%TAG1%%-RELEASE` | `thin` | `%%PYVER_MAJOR%%` | `%%PYVER2%%` |
63-
| `%%TAG1%%-%%PYVER_MAJOR%%%%PYVER1%%` | `amd64` | `%%TAG1%%-RELEASE` | `thin` | `%%PYVER_MAJOR%%` | `%%PYVER1%%` |
64-
| `%%TAG1%%-2` | `amd64` | `%%TAG1%%-RELEASE` | `thin` | `2` | - |
65-
| `%%TAG1%%-27` | `amd64` | `%%TAG1%%-RELEASE` | `thin` | `2` | `7` |
66-
| `%%TAG2%%` | `amd64` | `%%TAG2%%` | `thin` | - | - |
67-
| `%%TAG2%%-%%PYVER_MAJOR%%` | `amd64` | `%%TAG2%%` | `thin` | `%%PYVER_MAJOR%%` | - |
68-
| `%%TAG2%%-%%PYVER_MAJOR%%%%PYVER6%%` | `amd64` | `%%TAG2%%` | `thin` | `%%PYVER_MAJOR%%` | `%%PYVER6%%` |
69-
| `%%TAG2%%-%%PYVER_MAJOR%%%%PYVER5%%` | `amd64` | `%%TAG2%%` | `thin` | `%%PYVER_MAJOR%%` | `%%PYVER5%%` |
70-
| `%%TAG2%%-%%PYVER_MAJOR%%%%PYVER4%%` | `amd64` | `%%TAG2%%` | `thin` | `%%PYVER_MAJOR%%` | `%%PYVER4%%` |
71-
| `%%TAG2%%-%%PYVER_MAJOR%%%%PYVER3%%` | `amd64` | `%%TAG2%%` | `thin` | `%%PYVER_MAJOR%%` | `%%PYVER5%%` |
72-
| `%%TAG2%%-%%PYVER_MAJOR%%%%PYVER2%%` | `amd64` | `%%TAG2%%` | `thin` | `%%PYVER_MAJOR%%` | `%%PYVER2%%` |
73-
| `%%TAG2%%-%%PYVER_MAJOR%%%%PYVER1%%` | `amd64` | `%%TAG2%%` | `thin` | `%%PYVER_MAJOR%%` | `%%PYVER1%%` |
74-
| `%%TAG2%%-2` | `amd64` | `%%TAG2%%` | `thin` | `2` | - |
75-
| `%%TAG2%%-27` | `amd64` | `%%TAG2%%` | `thin` | `2` | `7` |
27+
```yaml
28+
%%OCI_CONFIGURATION%%
29+
```

0 commit comments

Comments
 (0)