• Ben Lubar's avatar
    Re-organize Dockerfile to improve incremental builds. (#10212) · d36fcb54
    Ben Lubar authored
    - 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
    - Move the installation of some static dependencies to *before* Mastodon
      code is imported to Docker.