]> cat aescling's git repositories - mastodon.git/commit
Re-organize Dockerfile to improve incremental builds. (#10212)
authorBen Lubar <ben.lubar+github@gmail.com>
Fri, 8 Mar 2019 15:12:48 +0000 (09:12 -0600)
committerEugen Rochko <eugen@zeonfederated.com>
Fri, 8 Mar 2019 15:12:48 +0000 (16:12 +0100)
commitd36fcb54c408536f15de1346f70b4a8c78e9cb34
tree2c19aa069416d593e292c4f41a5e4edd657abdf4
parent42e733681aef45c9e6224aed288e4c845782c173
Re-organize Dockerfile to improve incremental builds. (#10212)

- Always run apt update before any other apt command. (This fixes
  incremental builds failing if a remote package is updated.)
- Only copy dependency lists before installing dependencies. (This means
  editing code doesn't force all dependencies to be re-downloaded.)
- Delete cache in the same layer that it is created. (Otherwise,
  deleting cache *increases* the size of the image on non-squashed
  builds.)
- Move the installation of some static dependencies to *before* Mastodon
  code is imported to Docker.
Dockerfile