]> cat aescling's git repositories - mastodon.git/commitdiff
Reduce container size with clean yarn (#3506)
authorHinaloe <hina@hinaloe.net>
Sat, 30 Sep 2017 20:05:24 +0000 (05:05 +0900)
committerEugen Rochko <eugen@zeonfederated.com>
Sat, 30 Sep 2017 20:05:24 +0000 (22:05 +0200)
* Reduce container size with clean yarn

* Merge trouble

.yarnclean [new file with mode: 0644]
Dockerfile

diff --git a/.yarnclean b/.yarnclean
new file mode 100644 (file)
index 0000000..f2de528
--- /dev/null
@@ -0,0 +1,46 @@
+# test directories
+__tests__
+test
+tests
+powered-test
+
+# asset directories
+docs
+doc
+website
+images
+# assets
+
+# examples
+example
+examples
+
+# code coverage directories
+coverage
+.nyc_output
+
+# build scripts
+Makefile
+Gulpfile.js
+Gruntfile.js
+
+# configs
+.tern-project
+.gitattributes
+.editorconfig
+.*ignore
+.eslintrc
+.jshintrc
+.flowconfig
+.documentup.json
+.yarn-metadata.json
+.*.yml
+*.yml
+
+# misc
+*.gz
+*.md
+
+# for specific ignore
+!.svgo.yml
+
index 431ef5bbeb305db1e449411c14e95c245e6e2951..c3b38fa8b1a7f348cfbd10a0d6839bd049c61807 100644 (file)
@@ -60,11 +60,12 @@ RUN apk -U upgrade \
  && cd /mastodon \
  && rm -rf /tmp/* /var/cache/apk/*
 
-COPY Gemfile Gemfile.lock package.json yarn.lock /mastodon/
+COPY Gemfile Gemfile.lock package.json yarn.lock .yarnclean /mastodon/
 
 RUN bundle config build.nokogiri --with-iconv-lib=/usr/local/lib --with-iconv-include=/usr/local/include \
  && bundle install -j$(getconf _NPROCESSORS_ONLN) --deployment --without test development \
- && yarn --pure-lockfile
+ && yarn --pure-lockfile \
+ && yarn cache clean
 
 COPY . /mastodon