Following the suggestions here doesn't work. I do the steps below:
- Create a firewall rule to enable ports 8080, 4200 and set targets to "Apply to all" through Networking -> VPC network -> Firewall Rules -> Create firewall rule

- Allow http/https traffic in the instance settings

3. Verify ports are working using the instance external ip address
>>> python -m SimpleHTTPServer 8080
Serving HTTP on 0.0.0.0 port 8080 ...

4. Download and run the installation script
>>> sh docker-deploy-hdp30.sh
+ registry=hortonworks
+ name=sandbox-hdp
+ version=3.0.1
+ proxyName=sandbox-proxy
+ proxyVersion=1.0
+ flavor=hdp
+ echo hdp
+ mkdir -p sandbox/proxy/conf.d
+ mkdir -p sandbox/proxy/conf.stream.d
+ docker pull hortonworks/sandbox-hdp:3.0.1
3.0.1: Pulling from hortonworks/sandbox-hdp
70799bbf2226: Pulling fs layer
40963917cdad: Pulling fs layer
3fe9adbb8d7e: Pulling fs layer
ee3ec4e8cb3d: Pulling fs layer
7ea5917732c0: Pulling fs layer
2d951411620c: Pulling fs layer
f4c5e354e7fd: Pulling fs layer
22ffa6ef360f: Pulling fs layer
2060aa0f3751: Pull complete
ca01ba34744d: Pull complete
83326dded077: Pull complete
eb3d71b90b73: Pull complete
bdd1cab41c81: Pull complete
500cc770c4bd: Pull complete
0cb1decd5474: Pull complete
b9591f4b6855: Pull complete
f28e56086127: Pull complete
e7de4e7d0bca: Pull complete
ec77967d2166: Pull complete
4fdcae170114: Pull complete
6347f5df8ffc: Pull complete
6a6ecc232709: Pull complete
ea845898ff50: Pull complete
02135573b1bf: Pull complete
cb0176867cd8: Pull complete
3c08321268fd: Pull complete
82e82a97c465: Pull complete
8aaaa48ed101: Pull complete
74b321ac2ac5: Pull complete
569da02c0a66: Pull complete
569da02c0a66: Pull complete
af40820407ef: Pull complete
Digest: sha256:7b767af7b42030fb1dd0f672b801199241e6bef1258e3ce57361edb779d95921
Status: Downloaded newer image for hortonworks/sandbox-hdp:3.0.1
docker.io/hortonworks/sandbox-hdp:3.0.1
+ docker pull hortonworks/sandbox-proxy:1.0
1.0: Pulling from hortonworks/sandbox-proxy
951bdea65c93: Pull complete
4b9047c5fbbb: Pull complete
773156407aae: Pull complete
d8524176841d: Pull complete
Digest: sha256:42e4cfbcbb76af07e5d8f47a183a0d4105e65a1e7ef39fe37ab746e8b2523e9e
Status: Downloaded newer image for hortonworks/sandbox-proxy:1.0
docker.io/hortonworks/sandbox-proxy:1.0
+ [ hdp == hdf ]
docker-deploy-hdp30.sh: 28: [: hdp: unexpected operator
+ [ hdp == hdp ]
docker-deploy-hdp30.sh: 30: [: hdp: unexpected operator
+ grep hortonworks/sandbox-hdp
+ docker images
+ awk {print $2}
+ version=3.0.1
+ docker network create cda
33e7c4baf0fb1e928a52cc86da3e17c5f62386428ab9e8f459faefe81f19f466
+ docker run --privileged --name sandbox-hdp -h --network=cda --network-alias= -d hortonworks/sandbox-hdp:3.0.1
b237bf04d5978a61b4dc378c15f69fa94a2a18251f064e4efcefd576ce944dec
+ echo Remove existing postgres run files. Please wait
Remove existing postgres run files. Please wait
+ sleep 2
+ docker exec -t sandbox-hdp sh -c rm -rf /var/run/postgresql/*; systemctl restart postgresql-9.6.service;
+ sed s/sandbox-hdp-security/sandbox-hdp/g assets/generate-proxy-deploy-script.sh
+ mv -f assets/generate-proxy-deploy-script.sh.new assets/generate-proxy-deploy-script.sh
+ chmod +x assets/generate-proxy-deploy-script.sh
+ assets/generate-proxy-deploy-script.sh
+ grep MINGW
+ uname
+ chmod +x sandbox/proxy/proxy-deploy.sh
+ sandbox/proxy/proxy-deploy.sh
d70571eec42a3c7df589c7898186518da22b40fbee63e442386f772a4545fcf8
5. Verify installation
>>> docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
b237bf04d597 hortonworks/sandbox-hdp:3.0.1 "/usr/sbin/init" About a minute ago Up About a minute 22/tcp, 4200/tcp, 8080/tcp sandbox-hdp
6. Try to connect using the same ip and port that were verified in step #3