From 5353055d587e37f207fe34191354ec60772ca82d Mon Sep 17 00:00:00 2001 From: Marcin Kulik Date: Wed, 12 Apr 2017 21:43:32 +0200 Subject: [PATCH] Run bundle install before adding whole app source tree to prevent cache busting --- Dockerfile | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index a13df88..29cea3f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -67,14 +67,17 @@ RUN git clone https://github.com/asciinema/libtsm.git /tmp/libtsm && \ rm -rf /tmp/libtsm # install asciinema -ADD . /app +RUN mkdir /app WORKDIR /app -RUN cd /app/src && \ - make && \ - cd /app && \ - rm -f log/* && \ - bundle install && \ +ADD Gemfile* /app/ +RUN bundle install + +ADD . /app + +RUN cd src && make + +RUN rm -f log/* && \ mkdir -p tmp && \ ln -s /app/vendor/assets/javascripts/asciinema-player.js /app/a2png/ && \ ln -s /app/vendor/assets/stylesheets/asciinema-player.css /app/a2png/ && \