Dockerfile in switchery-rails-0.8.1 vs Dockerfile in switchery-rails-0.8.1.1

- old
+ new

@@ -5,33 +5,36 @@ # # Visit http://blog.zedroot.org/using-docker-to-maintain-a-ruby-gem/ # ~~~~ Image base ~~~~ # Base image with the latest Ruby only -FROM litaio/ruby:2.2.2 +FROM ruby:2.3.0-slim MAINTAINER Guillaume Hain zedtux@zedroot.org # ~~~~ Set up the environment ~~~~ ENV DEBIAN_FRONTEND noninteractive -# ~~~~ OS Maintenance ~~~~ -RUN apt-get update && apt-get install -y git +RUN mkdir -p /gem/ +WORKDIR /gem/ +ADD . /gem/ -# ~~~~ Rails Preparation ~~~~ +# ~~~~ OS Maintenance & Rails Preparation ~~~~ # Rubygems and Bundler -RUN touch ~/.gemrc && \ +RUN apt-get update && \ + apt-get install -y git build-essential && \ + touch ~/.gemrc && \ echo "gem: --no-ri --no-rdoc" >> ~/.gemrc && \ gem install rubygems-update && \ update_rubygems && \ gem install bundler && \ - mkdir -p /gem/ + bundle install && \ + apt-get remove --purge -y build-essential && \ + apt-get autoclean -y && \ + apt-get clean -WORKDIR /gem/ -ADD . /gem/ -RUN bundle install - # Import the gem source code VOLUME .:/gem/ + ENTRYPOINT ["bundle", "exec"] CMD ["rake", "-T"]