// While using Docker in macOS, you may need to replace $wgServer with http: //host.docker.internal:8080
'url' => $wgServer . $wgScriptPath . '/rest.php',
I found out that http: //container_name
for $wgServer is also working.
In my specific case I am also using HTTP Auth globally for the wiki instance, so I'm using http: //user:password@container_name
.