I have a Docker image that works fine in my local, but when I use it in Pipelines the behaviour is different.
I've tested locally following instructions here: https://confluence.atlassian.com/bitbucket/debug-your-pipelines-locally-with-docker-838273569.html
Still working on my local.
So, how to debug a Docker image in Pipelines when it works locally but not in Pipelines?
While my actual problem is not relevant to the answer (I would like to know how to debug it in general) I understand it's worth to explain my issue. The problem I've is related to Drupal. I'm trying to test a Drupal app. For that, I use Drush, the Drupal Shell. Drush it's unable to get the MySQL server connection details. The process is complex. The installation script generates a file with that information. That generated file is the same in my local and in Pipelines. What I would do is to debug the Pipelines docker image, but to do that I'd have to create patches for drush with print debug statements, make them publicly available, apply them with composer (drupal and drush are downloaded using composer) and check the output. This is feasible but slow and far from practical.