Error while trying to install Discourse

You missed a question.

The host command gives reasonable output; You probably ran that outside the container. Are the same DNS servers configured inside?