Skip to content

Commit f187eb1

Browse files
authored
Merge pull request #88 from AkihiroSuda/dev-arch
examples: add archlinux.yaml
2 parents 648c1f7 + 9c3cb08 commit f187eb1

File tree

7 files changed

+34
-6
lines changed

7 files changed

+34
-6
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ jobs:
8181
timeout-minutes: 40
8282
strategy:
8383
matrix:
84-
example: [default.yaml, alpine.yaml, debian.yaml, fedora.yaml]
84+
example: [default.yaml, alpine.yaml, debian.yaml, fedora.yaml, archlinux.yaml]
8585
steps:
8686
- uses: actions/setup-go@v2
8787
with:

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Lima is expected to be used on macOS hosts, but can be used on Linux hosts as we
2323

2424
✅ Intel on ARM
2525

26-
✅ Various guest Linux distributions: [Ubuntu](./examples/ubuntu.yaml), [Debian](./examples/debian.yaml), [Fedora](./examples/fedora.yaml), [Alpine](./examples/alpine.yaml), ...
26+
✅ Various guest Linux distributions: [Ubuntu](./examples/ubuntu.yaml), [Debian](./examples/debian.yaml), [Fedora](./examples/fedora.yaml), [Alpine](./examples/alpine.yaml), [Arch Linux](./examples/archlinux.yaml)...
2727

2828
Related project: [sshocker (ssh with file sharing and port forwarding)](https://github.com/AkihiroSuda/sshocker)
2929

@@ -216,7 +216,7 @@ Alternatively, you may also directly ssh into the guest: `ssh -p 60022 -o NoHost
216216
Yes, it should work, but not regularly tested on ARM.
217217

218218
#### "Can I run non-Ubuntu guests?"
219-
Debian, Fedora, and Alpine are also known to work.
219+
Debian, Fedora, Alpine, and Arch Linux are also known to work.
220220
See [`./examples/`](./examples/).
221221

222222
An image has to satisfy the following requirements:
@@ -227,7 +227,7 @@ An image has to satisfy the following requirements:
227227
- The following binaries to be preinstalled, or installable via the package manager:
228228
- `sshfs`
229229
- `newuidmap` and `newgidmap`
230-
- `apt-get`, `dnf`, or `apk` (if you want to contribute support for another package manager, run `git grep apt-get` to find out where to modify)
230+
- `apt-get`, `dnf`, `apk`, or `pacman` (if you want to contribute support for another package manager, run `git grep apt-get` to find out where to modify)
231231

232232
#### "Can I run other container engines such as Podman?"
233233
Yes, if you install it.

examples/archlinux.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
arch: "x86_64"
2+
images:
3+
# Hint: run `limactl prune` to invalidate the "LATEST" cache
4+
- location: "https://linuximages.de/openstack/arch/arch-openstack-LATEST-image-bootstrap.qcow2"
5+
arch: "x86_64"
6+
mounts:
7+
- location: "~"
8+
writable: false
9+
- location: "/tmp/lima"
10+
writable: true
11+
ssh:
12+
# localPort is changed from 60022 to avoid conflicting with the default.
13+
# (TODO: assign localPort automatically)
14+
localPort: 60050
15+
firmware:
16+
legacyBIOS: true

examples/k3s.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,11 @@
1010
# lima-k3s Ready control-plane,master 69s v1.21.1+k3s1
1111

1212
images:
13-
- location: "https://cloud-images.ubuntu.com/hirsute/current/hirsute-server-cloudimg-amd64.img"
14-
arch: "x86_64"
13+
# Hint: run `limactl prune` to invalidate the "current" cache
14+
- location: "https://cloud-images.ubuntu.com/hirsute/current/hirsute-server-cloudimg-amd64.img"
15+
arch: "x86_64"
16+
- location: "https://cloud-images.ubuntu.com/hirsute/current/hirsute-server-cloudimg-arm64.img"
17+
arch: "aarch64"
1518

1619
# Mounts are disabled in this example, but can be enabled optionally.
1720
mounts: []

examples/ubuntu.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
images:
2+
# Hint: run `limactl prune` to invalidate the "current" cache
23
- location: "https://cloud-images.ubuntu.com/hirsute/current/hirsute-server-cloudimg-amd64.img"
34
arch: "x86_64"
45
- location: "https://cloud-images.ubuntu.com/hirsute/current/hirsute-server-cloudimg-arm64.img"

pkg/cidata/cidata.TEMPLATE.d/boot/30-install-packages.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,13 @@ elif command -v dnf >/dev/null 2>&1; then
5050
ln -s fusermount3 /usr/bin/fusermount
5151
fi
5252
fi
53+
elif command -v pacman >/dev/null 2>&1; then
54+
if [ "${LIMA_CIDATA_MOUNTS}" -gt 0 ]; then
55+
if ! command -v sshfs >/dev/null 2>&1; then
56+
pacman -Syu --noconfirm sshfs
57+
fi
58+
fi
59+
# other dependencies are preinstalled on Arch Linux (https://linuximages.de/openstack/arch/)
5360
elif command -v apk >/dev/null 2>&1; then
5461
if [ "${LIMA_CIDATA_MOUNTS}" -gt 0 ]; then
5562
if ! command -v sshfs >/dev/null 2>&1; then

pkg/limayaml/default.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ images:
1313
arch: "aarch64"
1414

1515
# Download the file from the internet when the local file is missing.
16+
# Hint: run `limactl prune` to invalidate the "current" cache
1617
- location: "https://cloud-images.ubuntu.com/hirsute/current/hirsute-server-cloudimg-amd64.img"
1718
arch: "x86_64"
1819
- location: "https://cloud-images.ubuntu.com/hirsute/current/hirsute-server-cloudimg-arm64.img"

0 commit comments

Comments
 (0)