We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents b0daf60 + 26b71ad commit 24e8f6fCopy full SHA for 24e8f6f
pkg/cidata/cidata.TEMPLATE.d/boot/20-rootless-base.sh
@@ -71,7 +71,10 @@ for f in /etc/subuid /etc/subgid; do
71
# See userdbctl.
72
# 1073741824 (1G) is just an arbitrary number.
73
# 1073741825-1878982656 is left blank for additional accounts.
74
- grep -qw "${LIMA_CIDATA_USER}" $f || echo "${LIMA_CIDATA_USER}:524288:1073741824" >>$f
+ subuid_begin=524288
75
+ # https://github.com/moby/moby/issues/49810#issuecomment-2808108191
76
+ [ "${LIMA_CIDATA_UID}" -ge "${subuid_begin}" ] && subuid_begin="$((LIMA_CIDATA_UID + 1))"
77
+ grep -qw "${LIMA_CIDATA_USER}" $f || echo "${LIMA_CIDATA_USER}:${subuid_begin}:1073741824" >>$f
78
done
79
80
# Start systemd session
0 commit comments