Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
lima-vm
GitHub Repository: lima-vm/lima
Path: blob/master/templates/apptainer-rootful.yaml
2633 views
1
# A template to use Apptainer instead of containerd & nerdctl
2
# $ limactl start ./apptainer-rootful.yaml
3
# $ limactl shell apptainer-rootful apptainer run -u -B $HOME:$HOME docker://alpine
4
5
minimumLimaVersion: 2.0.0
6
7
base:
8
- template:_images/ubuntu-lts
9
- template:_default/mounts
10
11
containerd:
12
system: false
13
user: false
14
provision:
15
- mode: system
16
script: |
17
#!/bin/bash
18
set -eux -o pipefail
19
command -v apptainer >/dev/null 2>&1 && exit 0
20
# add the "Official PPA for Apptainer"
21
add-apt-repository -y ppa:apptainer/ppa
22
apt-get update
23
apt-get install -y apptainer-suid
24
probes:
25
- script: |
26
#!/bin/bash
27
set -eux -o pipefail
28
if ! timeout 30s bash -c "until command -v apptainer >/dev/null 2>&1; do sleep 3; done"; then
29
echo >&2 "apptainer is not installed yet"
30
exit 1
31
fi
32
hint: See "/var/log/cloud-init-output.log" in the guest
33
34