I have an issue while setting up docker container with android and ruby environment to run calabash test. I have this docker file for the android part. Whenever I am editing the docker file to install the latest version of ruby and for calabash just like below code

One Solution collect form web for “Setting up Ruby along with android in docker”

The reason you’re getting an error is that the Android Docker image you’re using does not have Ruby installed (rightly so).
And this Github issue expains why multiple FROM directives in one Dockerfile is not a good idea.
IMO your best bet would be to see how Ruby is installed in the Ruby Docker image and copy that over into your Dockerfile that builds off of the Android image. Or vice versa – whichever is less effort.