Thanks for this article. I also had that port-mapping problem.
Another way to access Spark internal ports:
docker service create — name squid — network spark-nw -p 3128:3128 sameersbn/squid:3.3.8–23
Thought very unsafe, this sets up an HTTP proxy you can use to access Spark web interfaces, including workers, stdout, …