]> cat aescling's git repositories - mastodon.git/commitdiff
Optimize Dockerfile
authorRyan Wade <ryan.wade@protonmail.com>
Thu, 6 Apr 2017 07:41:00 +0000 (15:41 +0800)
committerRyan Wade <ryan.wade@protonmail.com>
Thu, 6 Apr 2017 07:42:16 +0000 (15:42 +0800)
Optimize Dockerfile, reduce build time.

.dockerignore
Dockerfile

index 7892e503c9232f6cb4a25186c3fefb673fc24e51..21d1f59a1915fdbc1e1be4c5de6e80d58a4960a5 100644 (file)
@@ -5,3 +5,4 @@ public/assets
 node_modules
 storybook
 neo4j
+vendor/bundle
index bcc911343c7c7745cafc92f702da9c911e80310f..f5eb088933b8c69c24b94eae2f8418b6c24cda38 100644 (file)
@@ -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