Skip to content

Commit 00b5d08

Browse files
committed
Make sure that sudo is installed for Alpine
Because the cloud images only come with `doas`. Signed-off-by: Jan Dubois <[email protected]>
1 parent c399908 commit 00b5d08

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pkg/cidata/cidata.TEMPLATE.d/boot/10-alpine-prep.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ for REPO in main community; do
1919
fi
2020
done
2121

22+
# Alpine comes with doas instead of sudo
23+
if ! command -v sudo >/dev/null 2>&1; then
24+
apk add sudo
25+
fi
26+
2227
# Alpine doesn't use PAM so we need to explicitly allow public key auth
2328
usermod -p '*' "${LIMA_CIDATA_USER}"
2429

0 commit comments

Comments
 (0)