cat /etc/apk/repositories
:'
http://dl-cdn.alpinelinux.org/alpine/v3.17/main
http://dl-cdn.alpinelinux.org/alpine/v3.17/community
#http://dl-cdn.alpinelinux.org/alpine/edge/main
#http://dl-cdn.alpinelinux.org/alpine/edge/community
#http://dl-cdn.alpinelinux.org/alpine/edge/testing
:'
apk update
apk upgrade
apk add lxd
# enable service
rc-update add lxd
rc-service lxd start
rc-service lxd status
# configure system
rc-update add cgroups
rc-service cgroups start
# add cgfs to pam.d/system-login
echo "session optional pam_cgfs.so -c freezer,memory,name=systemd,unified" >> /etc/pam.d/system-login
# add user and group idmaps to lxc config
echo "lxc.idmap = u 0 100000 65536" >> /etc/lxc/default.conf
echo "lxc.idmap = g 0 100000 65536" >> /etc/lxc/default.conf
# add root and other users
echo "root:100000:65536" >> /etc/subuid
echo "root:100000:65536" >> /etc/subgid