Setting up Ruby along with android in docker
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
RUN gem install calabash-android
I am getting error just like
/bin/sh: 1: gem: not found
The command ‘/bin/sh -c gem install calabash-android’ returned a non-zero code: 127
And after that I have tried
FROM tracer0tong/android-emulator FROM ruby:2.3.0 RUN gem install calabash-android
like syntax to check whether it is gonna work and seems like not. Is there any way to install both?
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.