From: Guo Xiang Tan Date: Mon, 17 Apr 2017 03:11:56 +0000 (+0800) Subject: Add support for Ruby 2.4 in 1.4.0. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=88ee2e35b59b7e9c6f7390c138b0fc7526a823cb;p=discourse_docker.git Add support for Ruby 2.4 in 1.4.0. --- diff --git a/image/base/Dockerfile b/image/base/Dockerfile index a8d9fe7..bba9663 100644 --- a/image/base/Dockerfile +++ b/image/base/Dockerfile @@ -1,5 +1,5 @@ # NAME: discourse/base -# VERSION: 1.3.10 +# VERSION: 1.4.0 FROM ubuntu:16.04 ENV PG_MAJOR 9.5 @@ -70,19 +70,18 @@ RUN mkdir /lockless && cd /lockless && curl -O https://locklessinc.com/downloads RUN echo 'gem: --no-document' >> /usr/local/etc/gemrc &&\ mkdir /src && cd /src && git clone https://github.com/sstephenson/ruby-build.git &&\ cd /src/ruby-build && ./install.sh &&\ - cd / && rm -rf /src/ruby-build && ruby-build 2.3.3 /usr/local + cd / && rm -rf /src/ruby-build && ruby-build 2.4.1 /usr/local RUN gem install bundler &&\ - rm -rf /usr/local/share/ri/2.3.0/system &&\ + rm -rf /usr/local/share/ri/2.4.1/system &&\ cd / && git clone https://github.com/SamSaffron/pups.git ADD install-imagemagick /tmp/install-imagemagick RUN /tmp/install-imagemagick # Validate install -RUN ruby -e "v='`convert -version`'; ['png','tiff','jpeg','freetype'].each{ |f| ((STDERR.puts('no ' + f + ' support in imagemagick')); exit(-1)) unless v.include?(f)}" +RUN ruby -Eutf-8 -e "v = \`convert -version\`; %w{png tiff jpeg freetype}.each { |f| unless v.include?(f); STDERR.puts('no ' + f + ' support in imagemagick'); exit(-1); end }" -# ADD install-pngcrush /tmp/install-pngcrush RUN /tmp/install-pngcrush diff --git a/image/base/VERSION b/image/base/VERSION index 0c00f61..88c5fb8 100644 --- a/image/base/VERSION +++ b/image/base/VERSION @@ -1 +1 @@ -1.3.10 +1.4.0 diff --git a/image/base/install-imagemagick b/image/base/install-imagemagick index 80b429a..86a8040 100755 --- a/image/base/install-imagemagick +++ b/image/base/install-imagemagick @@ -19,7 +19,7 @@ make all && make install # Build and install ImageMagick -wget -O $WDIR/ImageMagick.tar.gz "http://www.imagemagick.org/download/ImageMagick-6.9.7-0.tar.gz" +wget -O $WDIR/ImageMagick.tar.gz "http://www.imagemagick.org/download/ImageMagick-6.9.8-3.tar.gz" IMDIR=$WDIR/$(tar tzf $WDIR/ImageMagick.tar.gz --wildcards "ImageMagick-*/configure" |cut -d/ -f1) tar zxf $WDIR/ImageMagick.tar.gz -C $WDIR cd $IMDIR diff --git a/image/build.rb b/image/build.rb index 6e45536..a5ea380 100644 --- a/image/build.rb +++ b/image/build.rb @@ -73,7 +73,7 @@ end.parse! DEFAULT_IMAGES = %i[base discourse discourse_test discourse_dev discourse_bench] todo = options[:image] || DEFAULT_IMAGES -version = options[:version] || '1.3.10' +version = options[:version] || '1.4.0' if ENV["USER"] != "root" STDERR.puts "Build script must be ran as root due to docker-squash" diff --git a/image/discourse/Dockerfile b/image/discourse/Dockerfile index 898b6a9..31ce6c4 100644 --- a/image/discourse/Dockerfile +++ b/image/discourse/Dockerfile @@ -1,6 +1,6 @@ # NAME: discourse/discourse -# VERSION: 1.3.10 -FROM discourse/base:1.3.10 +# VERSION: 1.4.0 +FROM discourse/base:1.4.0 MAINTAINER Sam Saffron "https://twitter.com/samsaffron" diff --git a/image/discourse_bench/Dockerfile b/image/discourse_bench/Dockerfile index 3df40e2..97f0bf0 100644 --- a/image/discourse_bench/Dockerfile +++ b/image/discourse_bench/Dockerfile @@ -1,6 +1,6 @@ # NAME: discourse/discourse_bench -# VERSION: 1.3.10 -FROM discourse/discourse_test:1.3.10 +# VERSION: 1.4.0 +FROM discourse/discourse_test:1.4.0 MAINTAINER Gerhard Schlager diff --git a/image/discourse_dev/Dockerfile b/image/discourse_dev/Dockerfile index 99d2122..1be453b 100644 --- a/image/discourse_dev/Dockerfile +++ b/image/discourse_dev/Dockerfile @@ -1,6 +1,6 @@ # NAME: discourse/discourse_dev -# VERSION: 1.3.10 -FROM discourse/base:1.3.10 +# VERSION: 1.4.0 +FROM discourse/base:1.4.0 MAINTAINER Sam Saffron "https://twitter.com/samsaffron" diff --git a/image/discourse_fast_switch/Dockerfile b/image/discourse_fast_switch/Dockerfile index 933b625..e061a86 100644 --- a/image/discourse_fast_switch/Dockerfile +++ b/image/discourse_fast_switch/Dockerfile @@ -1,8 +1,8 @@ # NAME: discourse/discourse_fast_switch -# VERSION: 1.3.10 +# VERSION: 1.4.0 # Allow to easily switch Ruby version in images that derive off this -FROM discourse/base:1.3.10 +FROM discourse/base:1.4.0 MAINTAINER Sam Saffron "https://twitter.com/samsaffron" diff --git a/image/discourse_test/Dockerfile b/image/discourse_test/Dockerfile index e709573..9e9aef5 100644 --- a/image/discourse_test/Dockerfile +++ b/image/discourse_test/Dockerfile @@ -1,6 +1,6 @@ # NAME: discourse/discourse_test -# VERSION: 1.3.10 -FROM discourse/discourse:1.3.10 +# VERSION: 1.4.0 +FROM discourse/discourse:1.4.0 MAINTAINER Sam Saffron "https://twitter.com/samsaffron" diff --git a/launcher b/launcher index 450ccf3..4115d6b 100755 --- a/launcher +++ b/launcher @@ -644,7 +644,7 @@ case "$command" in elif [ $LOCAL = $BASE ]; then echo "Updating Launcher" git pull || (echo 'failed to update' && exit 1) - + for (( i=${#BASH_ARGV[@]}-1,j=0; i>=0,j<${#BASH_ARGV[@]}; i--,j++ )) do args[$j]=${BASH_ARGV[$i]}