Skip to content

Commit f70b3d3

Browse files
committed
templates: replace alpine with alpine-image
The old ISO9660-based `alpine` template is still available as `alpine-iso`. Fix issue 2366 Fix issue 2386 Signed-off-by: Akihiro Suda <[email protected]>
1 parent b1d66d2 commit f70b3d3

File tree

8 files changed

+31
-30
lines changed

8 files changed

+31
-30
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ jobs:
226226
- experimental/net-user-v2.yaml
227227
- experimental/9p.yaml
228228
- docker.yaml
229-
- ../hack/test-templates/alpine-9p-writable.yaml
229+
- ../hack/test-templates/alpine-iso-9p-writable.yaml # Covers alpine-iso.yaml
230230
- ../hack/test-templates/test-misc.yaml
231231
steps:
232232
- uses: actions/checkout@v4

examples/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Distro:
1414
- [`almalinux-8`](./almalinux-8.yaml): AlmaLinux 8
1515
- [`almalinux-9`](./almalinux-9.yaml), `almalinux.yaml`: AlmaLinux 9
1616
- [`alpine`](./alpine.yaml): ☆Alpine Linux
17+
- [`alpine-iso`](./alpine-iso.yaml): ☆Alpine Linux (ISO9660 image). Compatible with the `alpine` template used in Lima prior to v1.0.
1718
- [`archlinux`](./archlinux.yaml): ⭐Arch Linux
1819
- [`centos-stream-9`](./centos-stream-9.yaml), `centos-stream.yaml`: CentOS Stream 9
1920
- [`debian-11`](./debian-11.yaml): Debian GNU/Linux 11(bullseye)

examples/alpine-image.yaml

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

examples/alpine-iso.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# This template requires Lima v0.7.0 or later.
2+
# Using the Alpine 3.20 aarch64 image with vmType=vz requires macOS Ventura 13.3 or later.
3+
4+
images:
5+
- location: "https://github.com/lima-vm/alpine-lima/releases/download/v0.2.39/alpine-lima-std-3.20.0-x86_64.iso"
6+
arch: "x86_64"
7+
digest: "sha512:df013ba0666460c9e303e996e46e061e613ce546124a9de60060041874c702444ac7a90e67f1aed4756b85cc89d40c5ea4375dea62c98b9536ceb44f18874b67"
8+
- location: "https://github.com/lima-vm/alpine-lima/releases/download/v0.2.39/alpine-lima-std-3.20.0-aarch64.iso"
9+
arch: "aarch64"
10+
digest: "sha512:7ff023e354bbf78eaf44f32a5417bec3ca2af853691e4c64ee4aa819674acd22720897ce9f23e3e959679a72e8300a31f5c6aa12be1c3d8ae7eff3c25b8b5e36"
11+
12+
mounts:
13+
- location: "~"
14+
- location: "/tmp/lima"
15+
writable: true
16+
17+
# The built-in containerd installer does not support Alpine currently.
18+
# Hint: use the "rd" ISO instead of the "std" ISO to enable containerd: https://github.com/lima-vm/alpine-lima/releases/
19+
containerd:
20+
system: false
21+
user: false

examples/alpine.yaml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,17 @@
1-
# This template requires Lima v0.7.0 or later.
2-
# Using the Alpine 3.20 aarch64 image with vmType=vz requires macOS Ventura 13.3 or later.
3-
41
images:
5-
- location: "https://github.com/lima-vm/alpine-lima/releases/download/v0.2.39/alpine-lima-std-3.20.0-x86_64.iso"
2+
- location: "https://dl-cdn.alpinelinux.org/alpine/v3.20/releases/cloud/nocloud_alpine-3.20.2-x86_64-uefi-cloudinit-r0.qcow2"
63
arch: "x86_64"
7-
digest: "sha512:df013ba0666460c9e303e996e46e061e613ce546124a9de60060041874c702444ac7a90e67f1aed4756b85cc89d40c5ea4375dea62c98b9536ceb44f18874b67"
8-
- location: "https://github.com/lima-vm/alpine-lima/releases/download/v0.2.39/alpine-lima-std-3.20.0-aarch64.iso"
4+
digest: "sha512:5828254c27c948824c4c6d4fb88c4d96ee9b5b58ae455036b1571bb037a5b5de124e1d55f00386b9e711cef7771146278bd5eb1036a2f8db6fa34611393ebec1"
5+
- location: "https://dl-cdn.alpinelinux.org/alpine/v3.20/releases/cloud/nocloud_alpine-3.20.2-aarch64-uefi-cloudinit-r0.qcow2"
96
arch: "aarch64"
10-
digest: "sha512:7ff023e354bbf78eaf44f32a5417bec3ca2af853691e4c64ee4aa819674acd22720897ce9f23e3e959679a72e8300a31f5c6aa12be1c3d8ae7eff3c25b8b5e36"
7+
digest: "sha512:76eeef3cb1b38b3a0c2e745d8108558645220355cd870cba3a88198bcd0036485a0a683d8469f8405251918e972d24c461d418a30112e92efe44b460e4cba7ba"
118

129
mounts:
1310
- location: "~"
1411
- location: "/tmp/lima"
1512
writable: true
1613

1714
# The built-in containerd installer does not support Alpine currently.
18-
# Hint: use the "rd" ISO instead of the "std" ISO to enable containerd: https://github.com/lima-vm/alpine-lima/releases/
1915
containerd:
2016
system: false
2117
user: false

hack/calculate-cache.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export LIMA_HOME
6969
# ubuntu-24.04 templates/experimental/net-user-v2.yaml
7070
# ubuntu-24.04 templates/experimental/9p.yaml
7171
# ubuntu-24.04 templates/docker.yaml
72-
# ubuntu-24.04 templates/../hack/test-templates/alpine-9p-writable.yaml
72+
# ubuntu-24.04 templates/../hack/test-templates/alpine-iso-9p-writable.yaml
7373
# ubuntu-24.04 templates/../hack/test-templates/test-misc.yaml
7474
# macos-12 templates/vmnet.yaml
7575
# macos-12 https://raw.githubusercontent.com/lima-vm/lima/v0.15.1/examples/ubuntu-lts.yaml

hack/test-templates.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ case "$NAME" in
4444
WARNING "Alpine does not support systemd"
4545
CHECKS["systemd"]=
4646
CHECKS["container-engine"]=
47-
[ "$NAME" = "alpine-9p-writable" ] && CHECKS["mount-path-with-spaces"]="1"
47+
[ "$NAME" = "alpine-iso-9p-writable" ] && CHECKS["mount-path-with-spaces"]="1"
4848
;;
4949
"k3s")
5050
ERROR "File \"$FILE\" is not testable with this script"
@@ -269,7 +269,7 @@ if [[ -n ${CHECKS["port-forwards"]} ]]; then
269269
fi
270270
"${scriptdir}/test-port-forwarding.pl" "${NAME}"
271271

272-
if [[ -n ${CHECKS["container-engine"]} || ${NAME} == "alpine" ]]; then
272+
if [[ -n ${CHECKS["container-engine"]} || ${NAME} == "alpine"* ]]; then
273273
INFO "Testing that \"${CONTAINER_ENGINE} run\" binds to 0.0.0.0 by default and is forwarded to the host"
274274
if [ "$(uname)" = "Darwin" ]; then
275275
# macOS runners seem to use `localhost` as the hostname, so the perl lookup just returns `127.0.0.1`
@@ -279,7 +279,7 @@ if [[ -n ${CHECKS["port-forwards"]} ]]; then
279279
fi
280280
if [ -n "${hostip}" ]; then
281281
sudo=""
282-
if [ "${NAME}" = "alpine" ]; then
282+
if [[ ${NAME} == "alpine"* ]]; then
283283
arch=$(limactl info | jq -r .defaultTemplate.arch)
284284
nerdctl=$(limactl info | jq -r ".defaultTemplate.containerd.archives[] | select(.arch==\"$arch\").location")
285285
curl -Lso nerdctl-full.tgz "${nerdctl}"

0 commit comments

Comments
 (0)