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

  • pip install pymssql from inside docker container
  • docker on RHEL - Error: Package: policycoreutils-python-2.5-8.el7.x86_64 (rhel-7-server-rpms)
  • Placeholder field for the ONBUILD section for child docker images to use
  • docker cli application with a dockerized web ui to control
  • How to automatically start services inside a docker container
  • Docker container hosting
  • /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?

  • Nodejs app with npm start script
  • Connect MySQL container to docker swarm
  • Python console within Pycharm in a Ubuntu Virtualbox fails to connect
  • How to use docker to spin up postgres database
  • use gcsfuse to mount google cloud storage buckets in a docker container
  • Why does Yesod's TestImport module ignoreEnv in loadAppSettings?
  • 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.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.