sudo docker exec -it mosquitto sh
cd mosquitto/config
mosquitto_passwd -c passwd_file <username>
type password
re-enter password
exit
sudo nano /home/pi/IOTstack/services/mosquitto/mosquitto.conf
add
password_file /mosquitto/config/passwd_file