Discourse depends on stuff on the SO, like ImageMagick, a pg_dump, etc to work properly. Docker is used to ensure you have an exact version of a lot of tools and dependencies and can use Discourse without worrying about compiling OpenSSL, Nginx and Ruby with a specific memory allocate library.