Functional Test using Selenium Docker Container

How do I configure codeception functioinal.suite.yml to work with a selenium docker image (selenium/standalone-chrome)?

My current configuration is:

suite_namespace: frontend\tests\functional
actor: FunctionalTester
- Filesystem
- Yii2
- WebDriver:
url: ‘http://localhost:4444/wd/hub
window_size: false # disabled in ChromeDriver
browser: chrome
host: selenium # comment this line if do you want to run it outside of docker container
“goog:chromeOptions”: # additional chrome options
args: [“headless”]

When I test with the above configuration by route is always wrong. But when I change the URL in the configuration to (http://localhost/frontend/web/) I get the following error: [Facebook\WebDriver\Exception\UnknownErrorException] unknown error: net::ERR_CONNECTION_REFUSED
(Session info: headless chrome=86.0.4240.75)