Go to ngrok.com and log in.
Then edit the docker-compose.yml and add:
ngrok:
image: wernight/ngrok
container_name: "${PROJECT_NAME}_ngrok"
ports:
- '4040:4040' # http://localhost:4040/
environment:
NGROK_PORT: nginx:80
NGROK_AUTH: 'xxxxxxxxxxxxxxx'
NGROK_REGION: 'eu'
links:
- nginx
Where NGROK_AUTH: xxxxx should be the token you see when you log in to your account on ngrok.com.
With this, it works for me locally with Docker4Drupal.