Host + Authorization required, but no authorization protocol specified

Guys I’m trying to forward the xserver from a docker container to my machine but I get the following error when trying to allow the connections for the xserver:

sudo xhost +
Authorization required, but no authorization protocol specified

xhost:  unable to open display ":0"

What am I missing?

Probably you should not be using sudo with xhost.