From d996898ca67e1531da1c901243a421369f9c38a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20=27rysiek=27=20Wo=C5=BAniak?= <rysiek@hackerspace.pl> Date: Wed, 14 Dec 2016 12:59:04 +0100 Subject: [PATCH] cleanups, PNGQUANT_VERSION, GIFSICLE_VERSION moved right in front where they're used, DISCOURSE_VERSION also (better use of caching layers during build, for example when changing DISCOURSE_VERSION but not PNGQUANT_VERSION) --- Dockerfile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index ba50d91..ab3c89c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,10 +2,6 @@ FROM rails WORKDIR /usr/src/app -ARG DISCOURSE_VERSION=1.7.0.beta3 -ARG GIFSICLE_VERSION=1.87 -ARG PNGQUANT_VERSION=2.4.1 - ENV RAILS_ENV=production \ RUBY_GC_MALLOC_LIMIT=90000000 \ RUBY_GLOBAL_METHOD_CACHE_SIZE=131072 \ @@ -13,6 +9,9 @@ ENV RAILS_ENV=production \ DISCOURSE_REDIS_HOST=redis \ DISCOURSE_SERVE_STATIC_ASSETS=true +ARG GIFSICLE_VERSION=1.87 +ARG PNGQUANT_VERSION=2.4.1 + RUN curl --silent --location https://deb.nodesource.com/setup_4.x | bash - \ && apt-get update && apt-get install -y --no-install-recommends \ autoconf \ @@ -43,6 +42,8 @@ RUN curl --silent --location https://deb.nodesource.com/setup_4.x | bash - \ && rm -fr /tmp/* \ && rm -rf /var/lib/apt/lists/* +ARG DISCOURSE_VERSION=1.7.0.beta3 + RUN git clone --branch v${DISCOURSE_VERSION} https://github.com/discourse/discourse.git . \ && git remote set-branches --add origin tests-passed \ && bundle config build.nokogiri --use-system-libraries -- GitLab