Sounds like you’re using a reverse proxy, CDN or something similar. Check if the real IP is somewhere present in $_SERVER – if so this might work or should be easy to adapt.
In the current form (12.3.6) WP-Statistics will only use $_SERVER[‘REMOTE_ADDR’] as source for visitor IP addresses (“includes/classes/class-wp-statistics.php:845ff). When running behind some types of load balancers, CDNs, Proxys – or in your case docker – this might only point to the previous server instead of the visitor. Most of these systems will send an additional header like “X-Forwarded-For” or “X-Real-IP” containing the originating system. Adding support for these headers is just 4 additional lines and would allow to use WP-Statistic even in these situations.
When calling ?wp_statistics_opt_out=1 on 12.3.6 a Cookie named “wp_statistics_opt_out” is set in the HTTP-answer.