Docker API 1.22 allows to specify static IPv4 and IPv6 addresses. This is an insert into /networks/<id>/connect call by the network id.