FROM ubuntu:16.04 RUN apt-get update RUN apt-get install -y build-essential curl git zlib1g-dev libssl-dev libreadline-dev libyaml-dev libxml2-dev libxslt-dev RUN apt-get install -y autoconf bison ruby RUN git clone https://github.com/ruby/ruby.git /ruby WORKDIR /ruby RUN autoconf RUN ./configure RUN make install-nodoc RUN apt-get install -y libmagickwand-dev RUN gem install rmagick RUN curl -O https://bugs.ruby-lang.org/attachments/download/6110/1.bmp.zip RUN unzip 1.bmp.zip RUN echo "require 'rmagick'" > test.rb RUN echo "(0..20).each do |_| Magick::ImageList.new('1.bmp').get_pixels(0, 0, 1600, 800).each_slice(1600).to_a end" >> test.rb CMD ruby test.rb