dcos_generate_config.sh is a self-extracting and executing docker container (A bash script with a docker container appended to it). The code that generates it is: https://github.com/dcos/dcos/blob/master/gen/installer/bash.py#L558
Inside that docker container, is a python interpreter, and all the code in the dcos/dcos repository. When you run dcos_generate_config.sh the python code that ends up getting run is: https://github.com/dcos/dcos/blob/master/dcos_installer/cli.py#L323
The docker container also contains all the bits for DC/OS so it can be used for fully isolated / offline installation.
dcos_generate_config.sh if you're following the Web, SSH, or Advanced installation instructions is fully self contained, no internet connection is needed. All the components we build and ship using our own package manager (pkgpanda). They are 100% independent of the base system packages. Most of DC/OS lives in /opt/mesosphere which is it's own isolated root.