You need docker swarm for that, it's pretty easy to setup and it works as an extension to docker.
If you selfhist eg. DNS, or another static app that you want highly available but from a single IP, you can use keepalived directly on the host and this allows you to have two machines that share a third virtual IP, and if server A fails, the IP moves automatically to Server B and you don't even notice that the server failed, because everything failed over to the other server.