Running Percona XtraDB Cluster in a multi-host Docker network

Hello! I try to run Percona XtraDB Cluster in Docker like in this blog post. But when I try to run second node I get errors in container logs:

2016-12-21T15:35:56.691657Z 0 [ERROR] WSREP: gcs/src/gcs_core.cpp:gcs_core_open():208: Failed to open backend connection: -131 (State not recoverable)
2016-12-21T15:35:56.691821Z 0 [ERROR] WSREP: gcs/src/gcs.cpp:gcs_open():1407: Failed to open channel ‘cluster1’ at ‘gcomm://10.0.0.3,10.0.0.3’: -131 (State not recoverable)
2016-12-21T15:35:56.691849Z 0 [ERROR] WSREP: gcs connect failed: State not recoverable
2016-12-21T15:35:56.691861Z 0 [ERROR] WSREP: wsrep::connect(gcomm://10.0.0.3,10.0.0.3) failed: 7
2016-12-21T15:35:56.691866Z 0 [ERROR] Aborting

As I understand, new node tries to connect to nodes with IP 10.0.0.3,10.0.0.3 , but I have only one node and its IP is not 10.0.0.3. How can I connect to master node without this error?

How are you starting up the second node? From the example, you’d have to use the etcd discovery service or pass the IP address of the first node via the CLUSTER_JOIN variable.