From a2637c17200f9dd2eea9e130368cea87076823c7 Mon Sep 17 00:00:00 2001 From: Ryan Wade Date: Thu, 6 Apr 2017 15:41:00 +0800 Subject: [PATCH] Optimize Dockerfile Optimize Dockerfile, reduce build time. --- .dockerignore | 1 + Dockerfile | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.dockerignore b/.dockerignore index 7892e503c..21d1f59a1 100644 --- a/.dockerignore +++ b/.dockerignore @@ -5,3 +5,4 @@ public/assets node_modules storybook neo4j +vendor/bundle diff --git a/Dockerfile b/Dockerfile index bcc911343..f5eb08893 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,7 @@ ENV RAILS_ENV=production \ WORKDIR /mastodon -COPY . /mastodon +COPY Gemfile Gemfile.lock package.json yarn.lock /mastodon/ RUN BUILD_DEPS=" \ postgresql-dev \ @@ -28,4 +28,6 @@ RUN BUILD_DEPS=" \ && apk del $BUILD_DEPS \ && rm -rf /tmp/* /var/cache/apk/* +COPY . /mastodon + VOLUME /mastodon/public/system /mastodon/public/assets