Bitcoin Core 0.18.0 in Docker container: Could not connect to the server
This was a very simple fix. Instead of regtest.rpcbind=127.0.0.1, I used regtest.rpcbind=0.0.0.0. The logs complain with a warning:
WARNING: the RPC server is not safe to expose to untrusted networks such as the public internet

but since I'm using regtest mode for development, it's not a problem.