update some details

change apt repo before apt-get
enable rewrite module
workaround issue https://github.com/docker/docker/issues/6345