Docker使ってないから違う話っぽいけど、自分も訳あって書き込みにはサブ回線を指定して使うように改造してる

diff --git a/lib/P2CurlRequest.php b/lib/P2CurlRequest.php
@@ -139,0 +140,3 @@ class P2CurlRequest
+ if (isset($this->config['interface'])) {
+ curl_setopt($ch, CURLOPT_INTERFACE, $this->config['interface']);
+ }
diff --git a/rep2/post.php b/rep2/post.php
@@ -516,0 +517,4 @@ function postIt($host, $bbs, $key, $post)
+ if ($_conf['post_interface']) {
+ $req->setConfig('interface', $_conf['post_interface']);
+ }
+

conf系ファイルの変更は省略
同じようにCURLOPT_IPRESOLVEを使えばIPv4とIPv6のどっちで書き込むかを指定できる