Public Repository

Last pushed: 2 years ago
Short Description
ARMv7 version of pure ruby container environment
Full Description

Dockerfile

#
# ARMv7 Ruby Dockerfile
#
# https://hub.docker.com/r/aerodame/armhf-ruby
#

# Pull base image.
FROM armv7/armhf-ubuntu_core

ENV RUBY_MAJOR 2.2
ENV RUBY_VERSION 2.2.3
ENV RUBY_DOWNLOAD_SHA256 df795f2f99860745a416092a4004b016ccf77e8b82dec956b120f18bdc71edce
ENV RUBYGEMS_VERSION 2.4.8

# skip installing gem documentation
RUN echo 'install: --no-document\nupdate: --no-document' >> "$HOME/.gemrc"

# Install Ruby.
RUN apt-get -y update \
  && apt-get install -y bison libgdbm-dev ruby \
  && apt-get install -y build-essential \
  && apt-get install -y wget \
  && apt-get install -y curl \
  && apt-get install -y autoconf \
  && apt-get install -y ruby-dev \
  && apt-get install -y libncurses-dev \
  && apt-get install -y libreadline-dev \
  && apt-get install -y libssl-dev \

  # we are done with all of our apt-get installs, so purge the list data
  && rm -rf /var/lib/apt/lists/* \
  && cd /tmp \
  && wget http://zlib.net/zlib-1.2.8.tar.gz \
  && tar zxvf zlib-1.2.8.tar.gz \
  && cd zlib-1.2.8 \
  && ./configure \
  && make \
  && make install \
  && mkdir -p /usr/src/ruby \
  && curl -fSL -o ruby.tar.gz "http://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.gz" \
  && echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.gz" | sha256sum -c - \
  && tar -xzf ruby.tar.gz -C /usr/src/ruby --strip-components=1 \
  && rm ruby.tar.gz \
  && cd /usr/src/ruby \
  && autoconf \
  && ./configure --disable-install-doc \
  && cd ext/openssl \
  && ruby extconf.rb \
  && cd ../.. \
  && cd ext/readline \
  && ruby extconf.rb \
  && cd ../.. \
  && make -j"$(nproc)" \
  && make install \
  && apt-get purge -y --auto-remove bison libgdbm-dev ruby \
  && gem update --system $RUBYGEMS_VERSION \
  && rm -r /usr/src/ruby

# install things globally, for great justice
ENV GEM_HOME /usr/local/bundle
ENV PATH $GEM_HOME/bin:$PATH

ENV BUNDLER_VERSION 1.10.6

RUN gem install bundler --version "$BUNDLER_VERSION" \
        && bundle config --global path "$GEM_HOME" \
        && bundle config --global bin "$GEM_HOME/bin"

# don't create ".bundle" in all our apps
ENV BUNDLE_APP_CONFIG $GEM_HOME

# Define default command.
CMD ["irb"]
Docker Pull Command
Owner
aerodame

Comments (0)