How to set up xdebug / docker / drupal stack?

My objective is to be able to debug a tricky piece of Drupal 8 code. My experience with docker is very limited (beginner level). I have a database docker container running which I spinned like this:

docker run --name drupalMulti-database -p 3306:3306 -v `pwd`:/var/lib/mysql -d percona:latest

Then, my drupal 8 docker container is connected to the container above like this:

docker run -e XDEBUG_CONFIG="remote_host=10.1.2.74" --name drupalMulti -p 8484:80 -p 8453:443 --link drupalMulti-database:mysql -v `pwd`:/var/www/html/ -d gitlab.OUR-COMPANY-NAME.com:4999/dev/PATH-TO-OUR-DRUPAL-CONTAINER

I am wondering how can I configure either PhpStorm or VsCode to work properly with xdebug, so I could debug my drupal code: set breakpoints, step into the code etc? Assume that I have no access to modify the existing docker images, but my Drupal image already has xdebug pre-installed.

(Running Drupal 8 / php 7.2 / mysql 5.7)

Source: StackOverflow