ARG from_image
FROM ${from_image}

# To prevent installed tzdata deb package to show interactive dialog.
ENV DEBIAN_FRONTEND noninteractive

RUN uname -a
RUN apt-get update -qq && \
  apt-get install -yq \
  -o Dpkg::Options::='--force-confnew' \
  ruby \
  git

RUN ruby --version
RUN gem env
RUN gem inst bundler

WORKDIR /build

CMD  ruby -e "puts Gem::Platform.local.to_s" && \
  gem install --local *.gem --verbose --no-document && \
  cd test/rcd_test/ && \
  bundle install && \
  rake test
