Skip to content

Commit 43d66a5

Browse files
authored
Merge pull request #2364 from afbjorklund/alpine-user-group
Remove the embedded default user in alpine cloud
2 parents aaf8b9c + 7b08d5b commit 43d66a5

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/sh
2+
# Remove the user embedded in the image,
3+
# and use cloud-init for users and groups.
4+
test -f /etc/alpine-release || exit 0
5+
test "$LIMA_CIDATA_USER" != "alpine" || exit 0
6+
7+
if [ "$(id -u alpine 2>&1)" = "1000" ]; then
8+
userdel alpine
9+
rmdir /home/alpine
10+
cloud-init clean --logs
11+
reboot
12+
fi

0 commit comments

Comments
 (0)