'Unable to install apk and launch the application in Appium docker

I have a docker running on linux machine with appium server on it, real device is connected via USB with all permissions granted.

The devices is recognizible by adb

The problem is when I running tests the apk is not installing, its like skipping the installation. Appium logs shows no errors. The test is running perfect locally on my Windows machine with this capabilities:

DesiredCapabilities capabilities = new DesiredCapabilities();
        capabilities.setCapability(MobileCapabilityType.PLATFORM_NAME, "Android");
        capabilities.setCapability(MobileCapabilityType.APP, apkLink);

I tried max of capabilities but it doesnt helped, so I dont know where to find solution.



Solution 1:[1]

Your file is present onto your local machine , first move to some place where your driver can access your .apk file from your docker machine . In docker try running this command.

sudo docker cp /home/(name)/(folder_name)/(file_name) (container_id):/(to_the_place_you_want_the_file_to_be)

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Snehal Gajbhiye