anchor.diff:          ruby /root/mk_i686.rb "
   <% end %>
   
  +# Patch rake-compiler to build and install static libraries for Linux rubies
   USER rvm
  -
   COPY build/patches2 /home/rvm/patches/
  -# Patch rake-compiler to build and install static libraries for Linux rubies
  -RUN cd /usr/local/rvm/gems/ruby-2.5.7/gems/rake-compiler-1.1.0 && \
  -    ( git apply /home/rvm/patches/rake-compiler-1.1.0/*.patch || true )
  -RUN cd /usr/local/rvm/gems/ruby-2.5.7/gems/hoe-3.20.0 && \
  -    ( git apply /home/rvm/patches/hoe-3.20.0/*.patch || true )
  -
  +RUN bash -c " \
  +    for v in ${RVM_RUBIES} ; do \
  +      cd /usr/local/rvm/gems/ruby-\$v/gems/rake-compiler-1.1.0 && \
  +      ( git apply /home/rvm/patches/rake-compiler-1.1.0/*.patch || true ) && \
  +      cd /usr/local/rvm/gems/ruby-\$v/gems/hoe-3.20.0 && \
  +      ( git apply /home/rvm/patches/hoe-3.20.0/*.patch || true ) \
  +    done "
   
   # Patch ruby-2.7.0 for cross build
   USER root
  
positive.code: # Install sudoers configuration
  COPY build/sudoers /etc/sudoers.d/rake-compiler-dock
  
  ENV RUBY_CC_VERSION 2.7.0:2.6.0:2.5.0:2.4.0:2.3.0:2.2.2
  
  CMD bash
  
negative.code: ENV BASH_ENV /etc/rubybashrc
  
  # install rubies and fix permissions on
  ENV RVM_RUBIES 2.5.7 2.7.0
  RUN bash -c " \
      export CFLAGS='-s -O3 -fno-fast-math -fPIC' && \
      for v in ${RVM_RUBIES} ; do \
          rvm install \$v --patch \$(echo ~/patches/ruby-\$v/* | tr ' ' ','); \
      done && \
      rvm cleanup all && \
  