For example, after moving from bullseye to
bookworm, the home directory /home/foo won’t
be set.
solution is to add --home /home/foo
adduser --system --home /home/foo --ingroup foofoo
> docker run --rm -it python:3.13-bullseye cat /etc/adduser.conf
# /etc/adduser.conf: `adduser' configuration.
# See adduser(8) and adduser.conf(5) for full documentation.
# The DSHELL variable specifies the default login shell on your
# system.
DSHELL=/bin/bash
# The DHOME variable specifies the directory containing users' home
# directories.
DHOME=/home> docker run --rm -it python:3.13-bookworm cat /etc/adduser.conf
# /etc/adduser.conf: `adduser' configuration.
# See adduser(8) and adduser.conf(5) for full documentation.
# A commented out setting indicates that this is the default in the
# code. If you need to change those settings, remove the comment and
# make your intended change.
# The login shell to be used for all new users.
# Default: DSHELL=/bin/bash
#DSHELL=/bin/bash
# The directory in which new home directories should be created.
# Default: DHOME=/home
# DHOME=/home