I have a Docker image that runs Appium server and Android Emulator. I am totally able to run a container based on that image in my computer (it requires the --privileged flag for that). I am also able to run automated tests in the emulator without any issues.
Now, I would like to run the emulator on Bitbucket pipelines. However, Bitbucket pipelines don't allow starting a Docker container with --privileged (and many other Docker flags) by security reasons. As I understood, this flag is responsible for running the emulator.
I also tried to add to the Docker image to the bitbucket-pipelines.yml file, hoping that I would be able to run the emulator directly in the host, instead of inside a container, but didn't work either, I got empty result from the commands "adb devices" and "emulator -list-avds"
Does anyone know anything that could help achieve this goal? I mean, running automated UI tests on Android in Bitbucket pipelines?