When executing the sudo {containing-folder...}/docker-usermod.sh, if the docker container cannot read /etc/passwd it just produces an error.
There is a workaround however, just execute the script without sudo by positioning yourself in its folder and execute ./docker-usermod.sh.