Launching app through appium with docker android

  android, android-emulator, appium, docker, mobile

Im currently using the docker android container to simulate the emulator and appium. Specifically, Im running this container with the code:

docker run --privileged -d -p 6080:6080 -p 5554:5554 -p 5555:5555 -p 4723:4723 -e DEVICE="Samsung Galaxy S6" -e APPIUM=true --name android-container budtmo/docker-android-x86-8.1

This allows me to run tests with:

# Android environment
import unittest
from appium import webdriver
import re
import time
desired_caps = {}
desired_caps["platformName"] = "Android"
desired_caps['deviceName'] = 'Samsung Galaxy S6'

driver = webdriver.Remote('http://localhost:4723/wd/hub', desired_caps)

However, If I want to launch an app, say with:

desired_caps['app'] = '/home/user/Documents/appium/instagram-168-0-0-37-355.apk'

Then I get the error:

WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: The application at '/home/user/Documents/appium/instagram-168-0-0-37-355.apk' does not exist or is not accessible

Is the problem that the docker container doesn’t have access to my local filesystem? Or is the issue that the file should be in the docker container and file path should navigate within the docker container?
im guessing the issue is the latter since im communicating with appium through rest api. Unless the app file is being sent as some encoding within the json request. Is this right?

Source: Docker Questions