forked from lima-vm/lima
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathalpine-nerdctl.yaml
57 lines (55 loc) · 1.9 KB
/
alpine-nerdctl.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# This template requires Lima v0.7.0 or later.
# Using the Alpine 3.18 aarch64 image with vmType=vz requires macOS Ventura 13.3 or later.
images:
- location: "https://github.com/lima-vm/alpine-lima/releases/download/v0.2.32/alpine-lima-std-3.18.0-x86_64.iso"
arch: "x86_64"
digest: "sha512:7b00fff78736a27a24e4a7de5f28037e9c7cf0fc539a33ec551c6ac619eb54237b5f25bfa35512fa7233cf23396dc249592710ef9150f619afa15267f9c8cbd4"
- location: "https://github.com/lima-vm/alpine-lima/releases/download/v0.2.32/alpine-lima-std-3.18.0-aarch64.iso"
arch: "aarch64"
digest: "sha512:bf23a22e05854670eef74d9bfad056caa249832f22d5594eb6bb02fa9aae109d33c764242f862d48de5b6715c4792a3ee29c19888a0711fb27113ba5cf1ccf21"
mounts:
- location: "~"
- location: "/tmp/lima"
writable: true
# The built-in containerd installer does not support Alpine currently.
containerd:
system: false
user: false
provision:
- mode: system
script: |
#!/bin/bash
set -eux -o pipefail
command -v nerdctl >/dev/null 2>&1 && exit 0
apk add nerdctl containerd buildctl buildkit tini
- mode: system
script: |
#!/bin/bash
set -eux -o pipefail
rc-update add containerd boot
service containerd start
rc-update add buildkitd boot
service buildkitd start
probes:
- description: "nerdctl to be installed"
script: |
#!/bin/bash
set -eux -o pipefail
if ! timeout 30s bash -c "until command -v nerdctl >/dev/null 2>&1; do sleep 3; done"; then
echo >&2 "nerdctl is not installed yet"
exit 1
fi
- description: "containerd to be runnning"
script: |
#!/bin/bash
set -eux -o pipefail
if ! timeout 30s bash -c "until pgrep containerd; do sleep 3; done"; then
echo >&2 "containerd is not running"
exit 1
fi
message: |
To run `nerdctl`, use `lima sudo nerdctl` (not `nerdctl.lima`):
------
export LIMA_INSTANCE={{.Name}}
lima sudo nerdctl run ghcr.io/afbjorklund/hello-nerd
------