Skip to content

Commit cb2f159

Browse files
committed
Move apptainer examples to ubuntu ppa
Fedora stopped updating their apptainer packages, and the Apptainer project introduced an official PPA for Ubuntu LTS. Signed-off-by: Anders F Björklund <[email protected]>
1 parent bf3f4ac commit cb2f159

File tree

2 files changed

+32
-26
lines changed

2 files changed

+32
-26
lines changed

examples/apptainer-rootful.yaml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,21 @@
22
# $ limactl start ./apptainer-rootful.yaml
33
# $ limactl shell apptainer-rootful apptainer run -u -B $HOME:$HOME docker://alpine
44

5-
# Fedora provides Apptainer in the default dnf.
6-
# Ubuntu does not seem to provide Apptainer in the default apt.
75
images:
8-
- location: "https://download.fedoraproject.org/pub/fedora/linux/releases/38/Cloud/x86_64/images/Fedora-Cloud-Base-38-1.6.x86_64.qcow2"
6+
# Try to use release-yyyyMMdd image if available. Note that release-yyyyMMdd will be removed after several months.
7+
- location: "https://cloud-images.ubuntu.com/releases/22.04/release-20230518/ubuntu-22.04-server-cloudimg-amd64.img"
98
arch: "x86_64"
10-
digest: "sha256:d334670401ff3d5b4129fcc662cf64f5a6e568228af59076cc449a4945318482"
11-
- location: "https://download.fedoraproject.org/pub/fedora/linux/releases/38/Cloud/aarch64/images/Fedora-Cloud-Base-38-1.6.aarch64.qcow2"
9+
digest: "sha256:afb820a9260217fd4c5c5aacfbca74aa7cd2418e830dc64ca2e0642b94aab161"
10+
- location: "https://cloud-images.ubuntu.com/releases/22.04/release-20230518/ubuntu-22.04-server-cloudimg-arm64.img"
1211
arch: "aarch64"
13-
digest: "sha256:ad71d22104a16e4f9efa93e61e8c7bce28de693f59c802586abbe85e9db55a65"
12+
digest: "sha256:b47f8be40b5f91c37874817c3324a72cea1982a5fdad031d9b648c9623c3b4e2"
13+
# Fallback to the latest release image.
14+
# Hint: run `limactl prune` to invalidate the cache
15+
- location: "https://cloud-images.ubuntu.com/releases/22.04/release/ubuntu-22.04-server-cloudimg-amd64.img"
16+
arch: "x86_64"
17+
- location: "https://cloud-images.ubuntu.com/releases/22.04/release/ubuntu-22.04-server-cloudimg-arm64.img"
18+
arch: "aarch64"
19+
1420
mounts:
1521
- location: "~"
1622
- location: "/tmp/lima"
@@ -19,21 +25,15 @@ containerd:
1925
system: false
2026
user: false
2127
provision:
22-
- mode: system
23-
script: |
24-
#!/bin/bash
25-
set -eux -o pipefail
26-
modprobe squashfs >/dev/null 2>&1 && exit 0
27-
dnf install -y kernel-modules-$(uname -r)
2828
- mode: system
2929
script: |
3030
#!/bin/bash
3131
set -eux -o pipefail
3232
command -v apptainer >/dev/null 2>&1 && exit 0
33-
dnf -y install apptainer apptainer-suid
34-
# See https://fedoraproject.org/wiki/Features/tmp-on-tmpfs
35-
echo "APPTAINER_TMPDIR=/var/tmp" > /etc/profile.d/apptainer.sh
36-
echo "export APPTAINER_TMPDIR" >> /etc/profile.d/apptainer.sh
33+
# add the "Official PPA for Apptainer"
34+
add-apt-repository -y ppa:apptainer/ppa
35+
apt-get update
36+
apt-get install -y apptainer-suid
3737
probes:
3838
- script: |
3939
#!/bin/bash

examples/apptainer.yaml

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,21 @@
22
# $ limactl start ./apptainer.yaml
33
# $ limactl shell apptainer apptainer run -u -B $HOME:$HOME docker://alpine
44

5-
# Fedora provides Apptainer in the default dnf.
6-
# Ubuntu does not seem to provide Apptainer in the default apt.
75
images:
8-
- location: "https://download.fedoraproject.org/pub/fedora/linux/releases/38/Cloud/x86_64/images/Fedora-Cloud-Base-38-1.6.x86_64.qcow2"
6+
# Try to use release-yyyyMMdd image if available. Note that release-yyyyMMdd will be removed after several months.
7+
- location: "https://cloud-images.ubuntu.com/releases/22.04/release-20230518/ubuntu-22.04-server-cloudimg-amd64.img"
98
arch: "x86_64"
10-
digest: "sha256:d334670401ff3d5b4129fcc662cf64f5a6e568228af59076cc449a4945318482"
11-
- location: "https://download.fedoraproject.org/pub/fedora/linux/releases/38/Cloud/aarch64/images/Fedora-Cloud-Base-38-1.6.aarch64.qcow2"
9+
digest: "sha256:afb820a9260217fd4c5c5aacfbca74aa7cd2418e830dc64ca2e0642b94aab161"
10+
- location: "https://cloud-images.ubuntu.com/releases/22.04/release-20230518/ubuntu-22.04-server-cloudimg-arm64.img"
1211
arch: "aarch64"
13-
digest: "sha256:ad71d22104a16e4f9efa93e61e8c7bce28de693f59c802586abbe85e9db55a65"
12+
digest: "sha256:b47f8be40b5f91c37874817c3324a72cea1982a5fdad031d9b648c9623c3b4e2"
13+
# Fallback to the latest release image.
14+
# Hint: run `limactl prune` to invalidate the cache
15+
- location: "https://cloud-images.ubuntu.com/releases/22.04/release/ubuntu-22.04-server-cloudimg-amd64.img"
16+
arch: "x86_64"
17+
- location: "https://cloud-images.ubuntu.com/releases/22.04/release/ubuntu-22.04-server-cloudimg-arm64.img"
18+
arch: "aarch64"
19+
1420
mounts:
1521
- location: "~"
1622
- location: "/tmp/lima"
@@ -24,10 +30,10 @@ provision:
2430
#!/bin/bash
2531
set -eux -o pipefail
2632
command -v apptainer >/dev/null 2>&1 && exit 0
27-
dnf -y install apptainer
28-
# See https://fedoraproject.org/wiki/Features/tmp-on-tmpfs
29-
echo "APPTAINER_TMPDIR=/var/tmp" > /etc/profile.d/apptainer.sh
30-
echo "export APPTAINER_TMPDIR" >> /etc/profile.d/apptainer.sh
33+
# add the "Official PPA for Apptainer"
34+
add-apt-repository -y ppa:apptainer/ppa
35+
apt-get update
36+
apt-get install -y apptainer
3137
probes:
3238
- script: |
3339
#!/bin/bash

0 commit comments

Comments
 (0)