I can't accomplish a very simple task - I want to run container on swarm cluster. By "run container" I mean get the same result as from "docker run ...". By swarm cluster I mean, that I have docker v1.12.5 and set up swarm cluster in swarm mode according to https://docs.docker.com/engine/swarm/swarm-tutorial/. I can not run service, because it's not a service - it's a job - I need exit code and all output. I can not find any documentation on this matter except some pieces, which suggest that I need to use something like "docker -H x.x.x.x:yyyy run", but I have no idea, which IP and port I should provide there - same through which I added nodes?
Unfortunately docker swarm does not currently have the ability to run single-shot jobs in a cluster. Swarm is basically supposed to run service. You can run a single container on each swarm host without using the swarm feature, but you have to decide which host to run.